Skip to content

Commit

Permalink
Fix and polish Javadoc for MimeTypeUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Dec 6, 2023
1 parent 7b95bd7 commit 1afea0b
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,10 @@ public static List<String> tokenize(String mimeTypes) {
}

/**
* Return a string representation of the given list of {@code MimeType} objects.
* @param mimeTypes the string to parse
* @return the list of mime types
* @throws IllegalArgumentException if the String cannot be parsed
* Generate a string representation of the given collection of {@link MimeType}
* objects.
* @param mimeTypes the {@code MimeType} objects
* @return a string representation of the {@code MimeType} objects
*/
public static String toString(Collection<? extends MimeType> mimeTypes) {
StringBuilder builder = new StringBuilder();
Expand All @@ -348,14 +348,12 @@ public static String toString(Collection<? extends MimeType> mimeTypes) {
}

/**
* Sorts the given list of {@code MimeType} objects by
* Sort the given list of {@code MimeType} objects by
* {@linkplain MimeType#isMoreSpecific(MimeType) specificity}.
*
* <p>Because of the computational cost, this method throws an exception
* when the given list contains too many elements.
* <p>Because of the computational cost, this method throws an exception if
* the given list contains too many elements.
* @param mimeTypes the list of mime types to be sorted
* @throws IllegalArgumentException if {@code mimeTypes} contains more
* than 50 elements
* @throws InvalidMimeTypeException if {@code mimeTypes} contains more than 50 elements
* @see <a href="https://tools.ietf.org/html/rfc7231#section-5.3.2">HTTP 1.1: Semantics
* and Content, section 5.3.2</a>
* @see MimeType#isMoreSpecific(MimeType)
Expand Down

0 comments on commit 1afea0b

Please sign in to comment.