Avoid String allocations with Assert.isTrue()
This commit is contained in:
@@ -534,7 +534,7 @@ public final class ContentDisposition {
|
||||
* @see <a href="https://tools.ietf.org/html/rfc2047">RFC 2047</a>
|
||||
*/
|
||||
private static String decodeQuotedPrintableFilename(String filename, Charset charset) {
|
||||
Assert.notNull(filename, "'input' String` should not be null");
|
||||
Assert.notNull(filename, "'input' String should not be null");
|
||||
Assert.notNull(charset, "'charset' should not be null");
|
||||
|
||||
byte[] value = filename.getBytes(US_ASCII);
|
||||
|
||||
@@ -186,7 +186,7 @@ public abstract class AbstractNamedValueArgumentResolver implements HttpServiceA
|
||||
}
|
||||
|
||||
if (value == null) {
|
||||
Assert.isTrue(!required, "Missing " + valueLabel + " value '" + name + "'");
|
||||
Assert.isTrue(!required, () -> "Missing " + valueLabel + " value '" + name + "'");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user