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

1.4 REGRESSION: JEditorPane: Styles using uppercase are not recognized

    Details

      Description



      Name: rmT116609 Date: 08/05/2002


      FULL PRODUCT VERSION :
      java version "1.4.1-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b14)
      Java HotSpot(TM) Client VM (build 1.4.1-beta-b14, mixed mode)

      FULL OPERATING SYSTEM VERSION :Microsoft Windows 2000 [Version 5.00.2195]


      ADDITIONAL OPERATING SYSTEMS :SunOS Release 5.7 Version
      Generic_106541-18 [UNIX(R) System V Release 4.0]


      A DESCRIPTION OF THE PROBLEM :
      The bug with ID 4283531 has revived on JDK1.4.x. In JDK 1.3.1 it is possible to use uppercased characters in CSS rules in JEditorPane. In J2SDK 1.4.x CSS rules with uppercased characters does not work.

      This works:

      p.lowercaserule {font-size:22.0pt;}

      Tags specified in uppercase in style sheets are not recognized:
      This does not work:
      p.UpperCaseRule {font-size:22.0pt;}

      Please have a look at my source code.

      REGRESSION. Last worked in version 1.3.1

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. save the source code as UpperCaseRuleBug.java
      2. compile the source code file with:
         javac UpperCaseRuleBug.java"
      3. run the class file whith:
         java UpperCaseRuleBug
      4. have a look at the appearing window

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      The two CSS rules in the source code contains the same font size, but the JEditorPane displays the first row with a smaller font size.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      No error messages.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.io.*;

      import javax.swing.*;
      import javax.swing.text.*;

      public class UpperCaseRuleBug {

          public static void main (String[] args) throws IOException,
      BadLocationException {

      JFrame frame = new JFrame ("UppercaseBug");
      JEditorPane pane = new JEditorPane ();
      frame.getContentPane ().add(pane, "Center");

      pane.setContentType ("text/html");
      Document doc = pane.getDocument ();
      EditorKit kit = pane.getEditorKit ();

      String html =
      "<html>"+
      "<head>"+
      "<style>"+
      "p.UpperCaseRule"+
      " {font-size:22.0pt;}"+
      "p.lowercaserule"+
      " {font-size:22.0pt;}"+
      "</style>"+
      "</head>"+
      "<body>"+
      "<p class=UpperCaseRule>formated with UpperCase rule</p>"+
      "<p class=lowercaserule>formated with lowercase rule</p>"+
      "</body>"+
      "</html>";

      StringReader reader = new StringReader (html);
      kit.read (reader, doc, 0);

      frame.setSize (400, 300);
      frame.setVisible (true);
          }
      }
      ---------- END SOURCE ----------

      Release Regression From : 1.3.1_04
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.

      (Review ID: 160068)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                peterz Peter Zhelezniakov (Inactive)
                Reporter:
                rmandalasunw Ranjith Mandala (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: