-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.1.6
-
sparc
-
solaris_2.5.1
Name: ccC48265 Date: 01/09/98
javac of JDK1.1.6B raises StringIndexOutOfBoundsException
when it meets malformed encoding character in a source.
( this bug is related with BUGID:4037914. )
For example, in test directory of JAE sources,
exception is following. (in Japanese environment)
% setenv LANG ja
% cd /usr/local/JAE1.1.6B-src/test
% javac java/intltest/BreakIteratorTest.java
java.lang.StringIndexOutOfBoundsException: String index out of range: -125
at java.lang.String.charAt(String.java)
at sun.io.ByteToCharEUC_JP.getUnicode(ByteToCharEUC_JP.java:81)
at sun.io.ByteToCharEUC_JP.convert(ByteToCharEUC_JP.java:159)
at java.io.InputStreamReader.convertInto(InputStreamReader.java)
at java.io.InputStreamReader.fill(InputStreamReader.java)
at java.io.InputStreamReader.read(InputStreamReader.java)
at java.io.BufferedReader.fill(BufferedReader.java)
at java.io.BufferedReader.read(BufferedReader.java)
at sun.tools.java.ScannerInputStream.read(ScannerInputStream.java)
at sun.tools.java.Scanner.xscan(Scanner.java)
at sun.tools.java.Scanner.scan(Scanner.java)
at sun.tools.java.Parser.scan(Parser.java)
at sun.tools.java.Parser.expect(Parser.java)
at sun.tools.java.Parser.parseStatement(Parser.java)
at sun.tools.java.Parser.parseBlockStatement(Parser.java)
at sun.tools.java.Parser.parseStatement(Parser.java)
at sun.tools.java.Parser.parseField(Parser.java)
at sun.tools.java.Parser.parseClassBody(Parser.java)
at sun.tools.java.Parser.parseNamedClass(Parser.java)
at sun.tools.java.Parser.parseClass(Parser.java)
at sun.tools.java.Parser.parseFile(Parser.java)
at sun.tools.javac.BatchEnvironment.parseFile(BatchEnvironment.java)
at sun.tools.javac.Main.compile(Main.java)
at sun.tools.javac.Main.main(Main.java)
error: An error has occurred in the compiler; please file a bug report
(http://java.sun.com/cgi-bin/bugreport.cgi).
1 error
P.S.
In JDK1.2Z:
% javac java/intltest/BreakIteratorTest.java
java/intltest/BreakIteratorTest.java:433: The source file encoding may be
different with this platform encoding. Please use -encoding option to adjust
file encoding, or apply native2ascii utility to make source file ASCII
encoding.
java/intltest/BreakIteratorTest.java:433: '}' expected.
2 errors
In JDK1.1.5:
% javac java/intltest/BreakIteratorTest.java
I/O exception
2 errors
(Review ID: 22897)
======================================================================
- duplicates
-
JDK-4121358 compile test code under /test throws StringIndexOutOfBoundsException.
-
- Closed
-
- relates to
-
JDK-4117820 ByteToCharSJIS throws ArrayIndexOutofBoundsExceptions
-
- Resolved
-
-
JDK-4087772 Dingbats converter throws ArrayIndexOutofBoundsException
-
- Closed
-