Avoid String allocations with Assert.isTrue()

This commit is contained in:
Sam Brannen
2022-11-05 14:40:45 +01:00
parent 902cdd1a2f
commit 5f02323b9c
27 changed files with 60 additions and 58 deletions

View File

@@ -177,7 +177,7 @@ public abstract class DataBufferUtils {
if (options.length > 0) {
for (OpenOption option : options) {
Assert.isTrue(!(option == StandardOpenOption.APPEND || option == StandardOpenOption.WRITE),
"'" + option + "' not allowed");
() -> "'" + option + "' not allowed");
}
}