From bf2a391a0c1781d4d3c354be21cf0676f53c3acd Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Fri, 1 Dec 2023 09:43:42 -0500 Subject: [PATCH] Fix typos in the `SerializationUtils` --- .../org/springframework/amqp/utils/SerializationUtils.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spring-amqp/src/main/java/org/springframework/amqp/utils/SerializationUtils.java b/spring-amqp/src/main/java/org/springframework/amqp/utils/SerializationUtils.java index 89690df4..6e9cb8de 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/utils/SerializationUtils.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/utils/SerializationUtils.java @@ -151,8 +151,7 @@ public final class SerializationUtils { if (TRUST_ALL && ObjectUtils.isEmpty(patterns)) { return; } - if (clazz.isArray() || clazz.isPrimitive() || clazz.equals(String.class) - || Number.class.isAssignableFrom(clazz) + if (clazz.isArray() || clazz.isPrimitive() || Number.class.isAssignableFrom(clazz) || String.class.equals(clazz)) { return; } @@ -163,7 +162,7 @@ public final class SerializationUtils { } } throw new SecurityException("Attempt to deserialize unauthorized " + clazz - + "; add allowed class name patterns to the message converter or, if you trust the message orginiator, " + + "; add allowed class name patterns to the message converter or, if you trust the message originator, " + "set environment variable '" + TRUST_ALL_ENV + "' or system property '" + TRUST_ALL_PROP + "' to true"); }