--- jaxb-ri/xjc/src/com/sun/tools/xjc/reader/xmlschema/SimpleTypeBuilder.java 2005-09-10 20:20:35.000000000 +0200 +++ jaxb-ri/xjc/src/com/sun/tools/xjc/reader/xmlschema/SimpleTypeBuilder.java-gil 2010-03-22 10:09:26.000000000 +0100 @@ -263,16 +263,16 @@ int max=-1; // unbounded XSFacet length = originalType.getFacet("length"); if(length!=null) { - int v = PositiveIntegerType.load(length.getValue()).intValue(); + int v = PositiveIntegerType.load(length.getValue().toString()).intValue(); min = max = v; } else { XSFacet minLength = originalType.getFacet("minLength"); if(minLength!=null) { - min = PositiveIntegerType.load(minLength.getValue()).intValue(); + min = PositiveIntegerType.load(minLength.getValue().toString()).intValue(); } XSFacet maxLength = originalType.getFacet("maxLength"); if(maxLength!=null) { - String v = maxLength.getValue().trim(); + String v = maxLength.getValue().toString().trim(); if(v.equals("unbounded")) max=-1; else max = PositiveIntegerType.load(v).intValue();