You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by sa...@apache.org on 2012/03/23 11:39:54 UTC
svn commit: r1304272 -
/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
Author: sagara
Date: Fri Mar 23 10:39:54 2012
New Revision: 1304272
URL: http://svn.apache.org/viewvc?rev=1304272&view=rev
Log:
Applied patch for AXIS2-5273.
Modified:
axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl?rev=1304272&r1=1304271&r2=1304272&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl (original)
+++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Fri Mar 23 10:39:54 2012
@@ -2132,10 +2132,17 @@
</xsl:otherwise>
</xsl:choose>
- if ((enumeration == null) && !((value == null) || (value.equals("")))) {
- throw new java.lang.IllegalArgumentException();
- }
- return enumeration;
+ // handle unexpected enumeration values properly
+ <xsl:if test="$ignoreunexpected">
+ log.warn("Unexpected value " + value + " for enumeration <xsl:value-of select="$name"/>");
+ return enumeration;
+ </xsl:if>
+ <xsl:if test="not($ignoreunexpected)">
+ if ((enumeration == null) && !((value == null) || (value.equals("")))) {
+ throw new java.lang.IllegalArgumentException();
+ }
+ return enumeration;
+ </xsl:if>
}
public static <xsl:value-of select="$name"/> fromString(java.lang.String value,java.lang.String namespaceURI)
throws java.lang.IllegalArgumentException {