Skip to content

Commit

Permalink
clean(core): Simplify MediaTypeDetector isSpecial()
Browse files Browse the repository at this point in the history
  • Loading branch information
vorburger committed Dec 14, 2024
1 parent 240395f commit bf3396d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions java/dev/enola/common/io/resource/MediaTypeDetector.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,7 @@ private MediaType detect(@Nullable String contentType, @Nullable String contentE
MediaType mediaType = null;
if (contentType != null) {
mediaType = MediaTypes.parse(contentType);
// TODO Use isSpecial() here? But it also includes DEFAULT...
if (TRY_FIXING.contains(mediaType.withoutParameters())
|| IGNORE.contains(mediaType.withoutParameters())) {
if (isSpecial(mediaType)) {
mediaType = null;
}
}
Expand Down

0 comments on commit bf3396d

Please sign in to comment.