Skip to content

Commit 86fbb86

Browse files
committed
Use unquoted value in assertion message in MediaType.checkParameters()
Closes gh-29461
1 parent 55b258f commit 86fbb86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -534,7 +534,7 @@ protected void checkParameters(String parameter, String value) {
534534
String unquotedValue = unquote(value);
535535
double d = Double.parseDouble(unquotedValue);
536536
Assert.isTrue(d >= 0D && d <= 1D,
537-
() -> "Invalid quality value \"" + value + "\": should be between 0.0 and 1.0");
537+
() -> "Invalid quality value \"" + unquotedValue + "\": should be between 0.0 and 1.0");
538538
}
539539
}
540540

0 commit comments

Comments
 (0)