axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-5848) After use -Eiu in wsdl2java.sh, factory classes for enumeration typte log warning erroneously
Date Mon, 01 May 2017 21:49:04 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-5848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15991619#comment-15991619
] 

Hudson commented on AXIS2-5848:
-------------------------------

UNSTABLE: Integrated in Jenkins build Axis2 #3698 (See [https://builds.apache.org/job/Axis2/3698/])
AXIS2-5771: Add a unit test for the feature added in AXIS2-5848 and fix it so that it stops
logging erroneous warnings. (veithen: rev 1793405)
* (edit) axis2/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
* (edit) axis2/modules/adb-tests/pom.xml
* (add) axis2/modules/adb-tests/src/test/java/org/apache/axis2/schema/axis2_5771
* (add) axis2/modules/adb-tests/src/test/java/org/apache/axis2/schema/axis2_5771/IgnoreUnexpectedTest.java
* (add) axis2/modules/adb-tests/src/test/xsd
* (add) axis2/modules/adb-tests/src/test/xsd/AXIS2-5771.xsd
* (edit) axis2/modules/tool/axis2-xsd2java-maven-plugin/src/main/java/org/apache/axis2/maven/xsd2java/AbstractXSD2JavaMojo.java


> After use -Eiu in wsdl2java.sh, factory classes for enumeration typte log warning erroneously
> ---------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5848
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5848
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.7.4
>            Reporter: Jing Teng
>
> For this schema,
> {code}
> <xs:simpleType name="CabinType">
>     <xs:restriction base="xs:string">
>         <xs:enumeration value="Default"/>
>         <xs:enumeration value="Y"/>
>         <xs:enumeration value="S"/>
>         <xs:enumeration value="C"/>
>         <xs:enumeration value="J"/>
>         <xs:enumeration value="F"/>
>         <xs:enumeration value="P"/>
>     </xs:restriction>
> </xs:simpleType>
> {code}
> Without -Eiu, the generated code is
> {code}
> public static class Factory {
>     public static CabinType fromValue(java.lang.String value)
>         throws java.lang.IllegalArgumentException {
>         CabinType enumeration = (CabinType) _table_.get(value);
>         // handle unexpected enumeration values properly
>         if (enumeration == null) {
>             throw new java.lang.IllegalArgumentException();
>         }
>         return enumeration;
>     }
> {code}
> With -Eiu, the code is
> {code}
> public static class Factory {
>     public static CabinType fromValue(java.lang.String value)
>         throws java.lang.IllegalArgumentException {
>         CabinType enumeration = (CabinType) _table_.get(value);
>         // handle unexpected enumeration values properly
>         log.warn("Unexpected value " + value +
>             " for enumeration CabinType");
>         return enumeration;
>     }
> {code}
> Obviously the code above is wrong



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message