You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by gh...@apache.org on 2014/01/10 12:21:45 UTC
svn commit: r1557084 -
/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Param.java
Author: ghuber
Date: Fri Jan 10 11:21:45 2014
New Revision: 1557084
URL: http://svn.apache.org/r1557084
Log:
Fix class cast exception. See WW-4275.
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Param.java
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Param.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Param.java?rev=1557084&r1=1557083&r2=1557084&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Param.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Param.java Fri Jan 10 11:21:45 2014
@@ -126,8 +126,7 @@ public class Param extends Component {
Object value = findValue(this.value);
if (suppressEmptyParameters) {
- String potentialValue = (String) value;
- if (potentialValue != null && potentialValue.length() > 0) {
+ if (value != null && !value.toString().isEmpty()) {
component.addParameter(name, value);
}
} else {