struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject svn commit: r1364627 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java
Date Mon, 23 Jul 2012 13:31:52 GMT
Author: lukaszlenart
Date: Mon Jul 23 13:31:52 2012
New Revision: 1364627

URL: http://svn.apache.org/viewvc?rev=1364627&view=rev
Log:
WW-3839 solves problem with NPE when Log level is WARN

Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java?rev=1364627&r1=1364626&r2=1364627&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java
(original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java
Mon Jul 23 13:31:52 2012
@@ -94,7 +94,7 @@ public class TextProviderHelper {
                 } else {
                 	LOG.warn("Could not locate the message resource '"+key+"' as there is no
TextProvider in the ValueStack.");
                 }
-                if (msg.equals(defaultMessage)) {
+                if (defaultMessage.equals(msg)) {
                 	LOG.warn("The default value expression '"+defaultMessage+"' was evaluated
and did not match a property.  The literal value '"+defaultMessage+"' will be used.");
                 } else {
                 	LOG.warn("The default value expression '"+defaultMessage+"' evaluated to
'"+msg+"'");



Mime
View raw message