Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Setters should use any min/max values from the WADL/XSD #75

Open
glassfishrobot opened this issue Mar 16, 2015 · 2 comments
Open

Setters should use any min/max values from the WADL/XSD #75

glassfishrobot opened this issue Mar 16, 2015 · 2 comments

Comments

@glassfishrobot
Copy link
Contributor

An XSD type like this:
<xs:simpleType name="CTSMW">
<xs:restriction base="xs:integer">
<xs:minInclusive value="-9999"/>
<xs:maxInclusive value="9999"/>
</xs:restriction>
</xs:simpleType>

Should generate a Setter that doe something like:

public void setCtsMW(int value) {
if (value <= 9999 && value >= -9999)

{ this.ctsMW = value; }

else

{ throw new Exception("Value out of range"); }

}

Environment

Wihdows 7
java version "1.7.0_76"
Java(TM) SE Runtime Environment (build 1.7.0_76-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.76-b04, mixed mode)

Affected Versions

[1.1.3]

@glassfishrobot
Copy link
Contributor Author

Reported by sirgeek

@glassfishrobot
Copy link
Contributor Author

This issue was imported from java.net JIRA WADL-75

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants