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

java.io.StreamTokenizer.eolIsSignificant(false) fails if ordinaryChar('n') calle

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.2.0, 1.3.0
    • core-libs
    • generic, sparc
    • solaris_2.5, solaris_7

      See the code fragments below:

            StreamTokenizer t;
            StringBufferInputStream aStream;

            aStream = new StringBufferInputStream("one\ntwo three\tfour");
            try {
               t = new StreamTokenizer(aStream);
               System.out.println("new tokenizer");
               t.whitespaceChars(0,9);
               t.wordChars(20, 0xff);
               t.ordinaryChar('\n');
               t.eolIsSignificant(false);
               System.out.println("set wordChars");
               t.nextToken();
               System.out.println("toString() = " + t.toString() );
               t.nextToken();
               System.out.println("toString() = " + t.toString() );
           

            Unassigned Unassigned
            sflemingsunw Steve Fleming (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: