Browse Source

Use unquoted value in assertion message in MediaType.checkParameters()

pull/29469/head
Johnny Lim 2 years ago committed by Juergen Hoeller
parent
commit
4c2072d20c
  1. 2
      spring-web/src/main/java/org/springframework/http/MediaType.java

2
spring-web/src/main/java/org/springframework/http/MediaType.java

@ -547,7 +547,7 @@ public class MediaType extends MimeType implements Serializable {
String unquotedValue = unquote(value); String unquotedValue = unquote(value);
double d = Double.parseDouble(unquotedValue); double d = Double.parseDouble(unquotedValue);
Assert.isTrue(d >= 0D && d <= 1D, Assert.isTrue(d >= 0D && d <= 1D,
() -> "Invalid quality value \"" + value + "\": should be between 0.0 and 1.0"); () -> "Invalid quality value \"" + unquotedValue + "\": should be between 0.0 and 1.0");
} }
} }

Loading…
Cancel
Save