| Summary: | Schema Gen: Change suggested file name to start with 1 rather than 0 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Blaise Doughan <blaise.doughan> | ||||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | enhancement | ||||||||
| Priority: | P3 | CC: | eclipselink.oxm-inbox | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 201516 [details]
MOXy - Fix
Created attachment 201517 [details]
MOXy - Test Cases
Fix checked into 2.3.1 at rev: 9893 Fix checked into trunk at rev: 9894 Code reviewed by: Matt MacIvor Fix Description: Started the schema counter at 1 instead of 0. The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
To be consistent with the JAXB referenced implementation we should change the numeric suffix on the suggested file name to start with 1 rather than 0. Example: import java.io.IOException; import javax.xml.bind.JAXBContext; import javax.xml.bind.SchemaOutputResolver; import javax.xml.transform.Result; import javax.xml.transform.stream.StreamResult; public class Demo { public static void main(String[] args) throws Exception { final SchemaOutputResolver sor = new SchemaOutputResolver() { @Override public Result createOutput(String namespaceUri, String suggestedFileName) throws IOException { System.out.println(suggestedFileName); Result r = new StreamResult(System.out); r.setSystemId(suggestedFileName); return r; } }; JAXBContext jc = JAXBContext.newInstance(FooBar.class, A.class); System.out.println(jc.getClass()); jc.generateSchema(sor); } } MOXy's suggested file name: schema0.xsd RI's suggested file name: schema1.xsd