Use unquoted value in assertion message in MediaType.checkParameters()
Closes gh-29461
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -534,7 +534,7 @@ public class MediaType extends MimeType implements Serializable {
|
||||
String unquotedValue = unquote(value);
|
||||
double d = Double.parseDouble(unquotedValue);
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user