-
Bug
-
Resolution: Won't Fix
-
P5
-
None
-
1.1.6
-
sparc
-
solaris_2.5.1
Name: dkC59003 Date: 03/10/98
javac (JDK1.1.4, JDK1.1.5, JDK1.1.6H) doesn't complain about
illegal hexadecimal literal 0x and as result fails to pass
the following JCK1.2 tests:
lang/LEX/lex062/lex06213/lex06213.html
Examples :
---------------------- lex06213.java --------------------------------
import java.io.PrintStream;
public class lex06213 {
public static void main( String argv[] ) {
System.exit(run(argv, System.out) + 95/*STATUS_TEMP*/);
}
public static int run( String argv[], PrintStream out ) {
long lng_var;
lng_var = 0x; // compile-time error
out.println("lng_var contains : " + lng_var);
return 0/*STATUS_PASSED*/;
}
}
-------------------------------------------------------------------------
jdk1.1.6 :
/export/ld22/java/konst/sqe/jck12/tests/lang/LEX/lex062/lex06293/lex06213 /export/ld14/java/dest/jdk1.1.6/solaris/bin/javac -d . lex06213.java
/export/ld22/java/konst/sqe/jck12/tests/lang/LEX/lex062/lex06293/lex06213 /export/ld14/java/dest/jdk1.1.6/solaris/bin/java lex06213
lng_var contains : 0
/export/ld22/java/konst/sqe/jck12/tests/lang/LEX/lex062/lex06293/lex06213
jdk1.2P :
/export/ld22/java/konst/sqe/jck12/tests/lang/LEX/lex062/lex06293/lex06213 /export/ld14/java/dest/jdk1.2P/solaris/bin/javac -d . lex06213.java
lex06213.java:12: Hexadecimal numbers must contain at least one hexadecimal digit.
lng_var = 0x; // compile-time error
^
1 error
/export/ld22/java/konst/sqe/jck12/tests/lang/LEX/lex062/lex06293/lex06213
======================================================================