diff --git a/org.springframework.core/src/main/java/org/springframework/util/MediaType.java b/org.springframework.core/src/main/java/org/springframework/util/MediaType.java index 3aff55aa210..dabd4615b3f 100644 --- a/org.springframework.core/src/main/java/org/springframework/util/MediaType.java +++ b/org.springframework.core/src/main/java/org/springframework/util/MediaType.java @@ -30,13 +30,13 @@ import org.springframework.core.CollectionFactory; /** * Represents an Internet Media Type, as defined in the HTTP specification. * - *

Consists of a {@linkplain #getType() type} - * and a {@linkplain #getSubtype() subtype}. Also has functionality to parse media types from a string using - * {@link #parseMediaType(String)}, or multiple comma-separated media types using {@link #parseMediaTypes(String)}. + *

Consists of a {@linkplain #getType() type} and a {@linkplain #getSubtype() subtype}. Also has functionality to + * parse media types from a string using {@link #parseMediaType(String)}, or multiple comma-separated media types using + * {@link #parseMediaTypes(String)}. * * @author Arjen Poutsma - * @since 3.0 * @see HTTP 1.1 + * @since 3.0 */ public final class MediaType implements Comparable { @@ -150,8 +150,8 @@ public final class MediaType implements Comparable { } /** - * Parses the given, comma-seperated string into a list of {@link MediaType} objects. This method can be used to - * parse an Accept or Content-Type header. + * Parses the given, comma-seperated string into a list of {@link MediaType} objects. This method can be used to parse + * an Accept or Content-Type header. * * @param mediaTypes the string to parse * @return the list of media types @@ -234,8 +234,8 @@ public final class MediaType implements Comparable { } /** - * Indicates whether this {@link MediaType} includes the given media type. For instance, text/* - * includes text/plain, text/html, etc. + * Indicates whether this {@link MediaType} includes the given media type. For instance, text/* includes + * text/plain, text/html, etc. * * @param other the reference media type with which to compare * @return true if this media type includes the given media type; false otherwise @@ -254,13 +254,13 @@ public final class MediaType implements Comparable { /** * Compares this {@link MediaType} to another. Sorting with this comparator follows the general rule:

- * audio/basic < audio/* < */*
. That is, an explicit media type is sorted before an - * unspecific media type. Quality parameters are also considered, so that
audio/* < audio/*;q=0.7; + * audio/basic < audio/* < */*
. That is, an explicit media type is sorted before an unspecific + * media type. Quality parameters are also considered, so that
audio/* < audio/*;q=0.7; * audio/*;q=0.3
. * * @param other the media type to compare to - * @return a negative integer, zero, or a positive integer as this media type is less than, equal to, or greater - * than the specified media type + * @return a negative integer, zero, or a positive integer as this media type is less than, equal to, or greater than + * the specified media type */ public int compareTo(MediaType other) { double qVal1 = this.getQualityValue(); @@ -339,7 +339,7 @@ public final class MediaType implements Comparable { MediaType mediaType = iterator.next(); mediaType.appendTo(builder); if (iterator.hasNext()) { - builder.append(','); + builder.append(", "); } } return builder.toString();