You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org> on 2010/12/27 16:37:47 UTC
[jira] Resolved: (AXIS2-3689)
java.lang.String.valueOf(param).matches() work not with boolean param
[ https://issues.apache.org/jira/browse/AXIS2-3689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amila Chinthaka Suriarachchi resolved AXIS2-3689.
-------------------------------------------------
Resolution: Fixed
now it does not process the face sets for boolean. for booleans we don't need a pattern. it can either be true, false or 0,1
> java.lang.String.valueOf(param).matches() work not with boolean param
> ---------------------------------------------------------------------
>
> Key: AXIS2-3689
> URL: https://issues.apache.org/jira/browse/AXIS2-3689
> Project: 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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org