commit | f79fba87dc3dd5b26a0e6564bc7889c053ed4853 | [log] [tgz] |
---|---|---|
author | Tobias Thierer <tobiast@google.com> | Mon Jan 14 15:20:23 2019 +0000 |
committer | Tobias Thierer <tobiast@google.com> | Mon Jan 14 17:23:37 2019 +0000 |
tree | d8ce23d404ef4a2c34044afd7090d87ac87d1d2a | |
parent | c10489b45ede8e59a36fe27a7e9ce7b852d4f218 [diff] |
Extract helper methods canonicalize() and allowedInMap(). These avoid some duplication. This CL also adds: - a sanity check that none of the types or extensions read from the mime.types data file is invalid (throws IAE otherwise), - unit test coverage for some invalid/unknown types. Test: MimeUtilsTest Change-Id: I7a3b449f2c5a0ab8b25da63676f6cab008d0f119