java-msv/java-msv-1.2-jdk15.patch

37 lines
1.5 KiB
Diff
Raw Normal View History

--- generator/src/com/sun/msv/generator/DataTypeGeneratorImpl.java 2005-06-14 17:08:35+0000 1.20
+++ generator/src/com/sun/msv/generator/DataTypeGeneratorImpl.java 2006-08-14 17:19:11+0000 1.21
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: DataTypeGeneratorImpl.java,v 1.20 2005/06/14 17:08:35 kohsuke Exp $
+ * @(#)$Id: DataTypeGeneratorImpl.java,v 1.21 2006/08/14 17:19:11 kohsuke Exp $
*
* Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
*
@@ -45,6 +45,7 @@
import com.sun.msv.datatype.xsd.XSDatatypeImpl;
import com.sun.msv.datatype.xsd.XmlNames;
import com.sun.msv.datatype.xsd.Base64BinaryType;
+import com.sun.msv.datatype.xsd.ByteType;
import com.sun.xml.util.XmlChars;
/**
@@ -158,7 +159,7 @@
if( dt.getClass()==UnsignedIntType.class )
return Long.toString( random.nextLong()&0x7FFFFFFF );
- if( dt.getClass()==Byte.class ) return Long.toString( random.nextInt(256) );
+ if( dt.getClass()== ByteType.class ) return Long.toString( random.nextInt(256) );
if( dt.getClass()==ShortType.class ) return Long.toString( (short)random.nextInt() );
if( dt.getClass()==IntType.class ) return Long.toString( random.nextInt() );
if( dt.getClass()==LongType.class ) return Long.toString( random.nextLong() );
@@ -196,7 +197,7 @@
for( int i=0; i<10; i++ ) {
try {
return dti.convertToLexicalValue(items[random.nextInt(items.length)],context);
- } catch( Exception x ) { ; }
+ } catch( Exception x ) { }
}
}