From d3a99a133ae39bb822c1daa047e4ca22ebfa6228 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 13 Jul 2020 08:50:10 +0200 Subject: [PATCH] [core] Fix log/exception message of XmppElementUtil The Class.toString() already prefixes the resulting string with "class ", no need to state it explicitly in the log message that this is a class. --- .../java/org/jivesoftware/smack/util/XmppElementUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/XmppElementUtil.java b/smack-core/src/main/java/org/jivesoftware/smack/util/XmppElementUtil.java index 34ccb0d81..b78f62ab9 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/XmppElementUtil.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/XmppElementUtil.java @@ -37,7 +37,7 @@ public class XmppElementUtil { } LOGGER.warning("The QNAME field of " + fullyQualifiedElement + " is not of type QNAME."); } catch (NoSuchFieldException e) { - LOGGER.finer("The class " + fullyQualifiedElement + " has no static QNAME field. Consider adding one."); + LOGGER.finer("The " + fullyQualifiedElement + " has no static QNAME field. Consider adding one."); // Proceed to fallback strategy. } catch (IllegalArgumentException | IllegalAccessException | SecurityException e) { throw new IllegalArgumentException(e); @@ -49,7 +49,7 @@ public class XmppElementUtil { namespace = (String) fullyQualifiedElement.getField("NAMESPACE").get(null); } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException e) { - throw new IllegalArgumentException("The class" + fullyQualifiedElement + " has no ELEMENT, NAMESPACE or QNAME member. Consider adding QNAME", e); + throw new IllegalArgumentException("The " + fullyQualifiedElement + " has no ELEMENT, NAMESPACE or QNAME member. Consider adding QNAME", e); } return new QName(namespace, element);