Polish: Overriding methods should do more than simply call the same method in the super class

This commit is contained in:
igor-suhorukov
2018-03-02 01:58:05 +03:00
committed by Juergen Hoeller
parent cd4f0935c5
commit ed936cbd89
4 changed files with 0 additions and 53 deletions

View File

@@ -436,28 +436,6 @@ public class MediaType extends MimeType implements Serializable {
return (qualityFactory != null ? Double.parseDouble(unquote(qualityFactory)) : 1D);
}
/**
* Indicate whether this {@code MediaType} includes the given media type.
* <p>For instance, {@code text/*} includes {@code text/plain} and {@code text/html}, and {@code application/*+xml}
* includes {@code application/soap+xml}, etc. This method is <b>not</b> symmetric.
* @param other the reference media type with which to compare
* @return {@code true} if this media type includes the given media type; {@code false} otherwise
*/
public boolean includes(@Nullable MediaType other) {
return super.includes(other);
}
/**
* Indicate whether this {@code MediaType} is compatible with the given media type.
* <p>For instance, {@code text/*} is compatible with {@code text/plain}, {@code text/html}, and vice versa.
* In effect, this method is similar to {@link #includes(MediaType)}, except that it <b>is</b> symmetric.
* @param other the reference media type with which to compare
* @return {@code true} if this media type is compatible with the given media type; {@code false} otherwise
*/
public boolean isCompatibleWith(@Nullable MediaType other) {
return super.isCompatibleWith(other);
}
/**
* Return a replica of this instance with the quality value of the given MediaType.
* @return the same instance if the given MediaType doesn't have a quality value, or a new one otherwise