Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4030251

InputStreamReader failed on 2k boundary

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      Both on Solaris and Win32 platform, InputStreamReader throws an exception
      during compilation of source on which a Japanese Kanji (or multibyte character) exists over the 2k boundary (i.e. first byte of Kanji is at byte 2047, and second
      byte of Kanji is at byte 2048), java.io.InputStreamReader malfunctions.
      That makes compilation of some java sources fail.

      Solaris ouputs:

      % javac TwoKiro.java
      java.lang.InternalError: Converter malfunction (EUCJIS) -- please send a bug
      report to ###@###.###
              at java.io.InputStreamReader.malfunction(InputStreamReader.java)
              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.useInputStream(Scanner.java)
              at sun.tools.java.Scanner.<init>(Scanner.java)
              at sun.tools.java.Parser.<init>(Parser.java)
              at sun.tools.javac.BatchParser.<init>(BatchParser.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:

      Win32 outputs:
      java.lang.InternalError: Converter malfunction (SJIS) -- please send a bug repor
      ^M
      t to ###@###.###^M
              at java.io.InputStreamReader.malfunction(InputStreamReader.java:119)^M
              at java.io.InputStreamReader.convertInto(InputStreamReader.java:133)^M
              at java.io.InputStreamReader.fill(InputStreamReader.java:175)^M
              at java.io.InputStreamReader.read(InputStreamReader.java:236)^M
              at java.io.BufferedReader.fill(BufferedReader.java:142)^M
              at java.io.BufferedReader.read(BufferedReader.java:159)^M
              at sun.tools.java.ScannerInputStream.read(ScannerInputStream.java:69)^M
              at sun.tools.java.Scanner.useInputStream(Scanner.java:168)^M
              at sun.tools.java.Scanner.<init>(Scanner.java:153)^M
              at sun.tools.java.Parser.<init>(Parser.java:67)^M
              at sun.tools.javac.BatchParser.<init>(BatchParser.java:69)^M
              at sun.tools.javac.BatchEnvironment.parseFile(BatchEnvironment.java:212)
      ^M
      ^M
              at sun.tools.javac.Main.compile(Main.java:255)^M
              at sun.tools.javac.Main.main(Main.java:456)^M
      error: An error has occurred in the compiler; please file a bug report (java-bug
      ^M
      ###@###.###).^M
      1 error^M

      Source:(for EUCJIS and SJIS)

      import java.awt.*;
      import java.applet.Applet;
      import java.io.*;

      public class TwoKiro extends Applet {
        public void init() {
        }

        public void start() {
        }

        public void stop() {
        }

        public void destroy() {
        }

        public void paint(Graphics g) {
          g.drawString(TString, 0, 20);
        }

        String TString = "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + "JugemuJugemuGokounoSurikire, Kaijarisuigyono suigyoumatu "
          + " : ð×";
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                nishimur Naoyuki Ishimura (Inactive)
                Reporter:
                sishidasunw Shoji Ishida (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: