From 9e4cddf5db33a44675bba2a00cd25032b84ab87d Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Tue, 8 Nov 2022 14:21:58 +0100 Subject: [PATCH] Fix precondition assertions --- .../orm/jpa/support/InjectionCodeGenerator.java | 2 +- .../java/org/springframework/http/ContentDisposition.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/support/InjectionCodeGenerator.java b/spring-orm/src/main/java/org/springframework/orm/jpa/support/InjectionCodeGenerator.java index 27083992c3..1e14aaa3e3 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/support/InjectionCodeGenerator.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/support/InjectionCodeGenerator.java @@ -53,7 +53,7 @@ class InjectionCodeGenerator { InjectionCodeGenerator(ClassName targetClassName, RuntimeHints hints) { - Assert.notNull(hints, "ClassName must not be null"); + Assert.notNull(targetClassName, "ClassName must not be null"); Assert.notNull(hints, "RuntimeHints must not be null"); this.targetClassName = targetClassName; this.hints = hints; diff --git a/spring-web/src/main/java/org/springframework/http/ContentDisposition.java b/spring-web/src/main/java/org/springframework/http/ContentDisposition.java index 3674f600e5..8d9dcd2fc4 100644 --- a/spring-web/src/main/java/org/springframework/http/ContentDisposition.java +++ b/spring-web/src/main/java/org/springframework/http/ContentDisposition.java @@ -535,8 +535,8 @@ public final class ContentDisposition { * @see RFC 2047 */ private static String decodeQuotedPrintableFilename(String filename, Charset charset) { - Assert.notNull(filename, "'input' String should not be null"); - Assert.notNull(charset, "'charset' should not be null"); + Assert.notNull(filename, "'filename' must not be null"); + Assert.notNull(charset, "'charset' must not be null"); byte[] value = filename.getBytes(US_ASCII); ByteArrayOutputStream baos = new ByteArrayOutputStream();