eclipse-archived / californium.core

Californium project
86 stars 69 forks source link

refactor MediaTypeRegistry to allow custom types #56

Open ryanmeador opened 8 years ago

ryanmeador commented 8 years ago

Per the discussion in #54, I've refactored the MediaTypeRegistry to use an inner type, MediaType, to store type information. This allows for users to add their own custom types as needed.

I also wrote unit tests for the old API and verified that they still work with the new one.

I removed the non-IANA types that were previously present in the registry, which could be a breaking change for some users (see the conversation in #54). If necessary, I'll add them back in, but I really think removing them is the right choice.

ryanmeador commented 8 years ago

@mkovatsc any thoughts?