axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Weck (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-3689) java.lang.String.valueOf(param).matches() work not with boolean param
Date Tue, 01 Apr 2008 13:10:24 GMT
java.lang.String.valueOf(param).matches() work not with boolean param
---------------------------------------------------------------------

                 Key: AXIS2-3689
                 URL: https://issues.apache.org/jira/browse/AXIS2-3689
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: codegen
    Affects Versions: 1.3
            Reporter: Andreas Weck
            Priority: Minor


If you generate code with the follwoing XSD:
<xs:element name="XY">
<xs:simpleType>
  <xs:restriction base="xs:boolean">
	<xs:pattern value="[01]"/>
  </xs:restriction>
</xs:simpleType>
</xs:element>

you will have a class with the method:
public void setXY_type0(boolean param) {
	if (java.lang.String.valueOf(param).matches("[01]")) {
		this.localXY_type0 = param;
	} else {
		throw new java.lang.RuntimeException();
	}
}

The Problem:
The return value of java.lang.String.valueOf(param).matches("[01]")  never can be true!!!
java.lang.String.valueOf(boolean) returns "true" or "false"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message