(/castor/trunk/codegen/src/main/java/org/exolab/castor/builder/BaseFactory.java)
xs:documentation string ending in * causes ArrayIndexOutOfBoundsException in BaseFactory.normalize() line 103 rev 6807 - however i believe the offending line is 112, where when an asterix is found a check for '/' is made by looking at the next char in the array without checking if it's at the end of the array already.
If you have an xsd annotation like the one below in your xsd it will trigger an ArrayIndexOutOfBoundsException when you try to generate source:
<xs:annotation>
<xs:documentation>Accommodation rating, e.g. 3*, 5*</xs:documentation>
</xs:annotation>
which causes the following stack trace output:
Caused by: java.lang.ArrayIndexOutOfBoundsException: 33
at org.exolab.castor.builder.BaseFactory.normalize(BaseFactory.java:103)
at org.exolab.castor.builder.SourceFactory.processAnnotations(SourceFactory.java:1516)
at org.exolab.castor.builder.SourceFactory.createSourceCode(SourceFactory.java:771)
at org.exolab.castor.builder.SourceFactory.processAttributes(SourceFactory.java:1584)
at org.exolab.castor.builder.SourceFactory.processComplexType(SourceFactory.java:1715)
at org.exolab.castor.builder.SourceFactory.processComplexType(SourceFactory.java:646)
at org.exolab.castor.builder.SourceFactory.createSourceCode(SourceFactory.java:342)
at org.exolab.castor.builder.SourceGenerator.processComplexType(SourceGenerator.java:899)
at org.exolab.castor.builder.SourceGenerator.generateAllClassFiles(SourceGenerator.java:694)
at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:655)
at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:598)
at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:503)
at com.xmltravel.taskdefs.CastorSourceGenerator.compile(Unknown Source)
if you add a space to the end of the string it works fine:
<xs:annotation>
<xs:documentation>Accommodation rating, e.g. 3*, 5* </xs:documentation>
</xs:annotation>