axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cleber Zarate (Created) (JIRA)" <>
Subject [jira] [Created] (AXIS2-5273) Allows forward-compatibility by ignoring unexpected enumeration values
Date Mon, 19 Mar 2012 15:16:37 GMT
Allows forward-compatibility by ignoring unexpected enumeration values

                 Key: AXIS2-5273
             Project: Axis2
          Issue Type: Bug
          Components: adb, codegen
    Affects Versions: 1.7.0
            Reporter: Cleber Zarate
            Priority: Minor

[AXIS2-4859] has been patched adding the -Eiu option to ignore unexpected elements. However,
to truly be forward-compatibly, generated code should also ignore unexpected enumeration values.
Here's the snippet necessary for the adb code generation. I opted to return null when an unexpected
enumeration is found, as opposed to skip it:

ADBBeanTemplate-bean.xsl line 2135:

                    // handle unexpected enumeration values properly
                    <xsl:if test="$ignoreunexpected">
                        log.warn("Unexpected value " + value + " for enumeration <xsl:value-of
                        return enumeration;
                    <xsl:if test="not($ignoreunexpected)">
                        if ((enumeration == null) &amp;&amp; !((value == null) ||
(value.equals("")))) {
                            throw new java.lang.IllegalArgumentException();
                        return enumeration;

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message