[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: Swing html package cleanup

Kaffe CVS cvs-commits at kaffe.org
Tue Apr 19 10:14:14 PDT 2005


PatchSet 5718 
Date: 2005/04/19 17:00:00
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: Swing html package cleanup

2005-04-19  Dalibor Topic  <robilad at kaffe.org>

        Resynced with GNU Classpath.

        2005-04-12  Michael Koch  <konqueror at gmx.de>

        * javax/swing/text/html/HTMLFrameHyperlinkEvent.java:
        Reformatted.
        * javax/swing/text/html/parser/AttributeList.java:
        Fixed order of modifiers.
        (AttributeList): Made final.
        * javax/swing/text/html/parser/ContentModel.java:
        Fixed html characters in javadocs.
        * javax/swing/text/html/parser/DTD.java
        (DTD): Don't implement java.io.Serializable directly.
        (getElement): Simplified.
        * javax/swing/text/html/parser/DTDConstants.java:
        Reformatted file.
        * javax/swing/text/html/parser/Element.java:
        Fixed order of modifiers.
        * javax/swing/text/html/parser/Parser.java:
        Reformatted. Don't use fully-qualified class names.
        * javax/swing/text/html/parser/ParserDelegator.java:
        Fixed order of modifiers.
        * javax/swing/text/rtf/RTFParser.java:
        Re-ordered import statements.
        * javax/swing/text/rtf/RTFScanner.java:
        Removed unused import statement.

Members: 
	libraries/javalib/javax/swing/text/html/HTMLFrameHyperlinkEvent.java:1.1->1.2 
	libraries/javalib/javax/swing/text/html/parser/AttributeList.java:1.2->1.3 
	libraries/javalib/javax/swing/text/html/parser/ContentModel.java:1.1->1.2 
	libraries/javalib/javax/swing/text/html/parser/DTD.java:1.1->1.2 
	libraries/javalib/javax/swing/text/html/parser/DTDConstants.java:1.1->1.2 
	libraries/javalib/javax/swing/text/html/parser/Element.java:1.1->1.2 
	libraries/javalib/javax/swing/text/html/parser/Parser.java:1.2->1.3 
	libraries/javalib/javax/swing/text/html/parser/ParserDelegator.java:1.2->1.3 
	libraries/javalib/javax/swing/text/rtf/RTFParser.java:1.1->1.2 
	libraries/javalib/javax/swing/text/rtf/RTFScanner.java:1.1->1.2 
	ChangeLog:1.3885->1.3886 

Index: kaffe/libraries/javalib/javax/swing/text/html/HTMLFrameHyperlinkEvent.java
diff -u kaffe/libraries/javalib/javax/swing/text/html/HTMLFrameHyperlinkEvent.java:1.1 kaffe/libraries/javalib/javax/swing/text/html/HTMLFrameHyperlinkEvent.java:1.2
--- kaffe/libraries/javalib/javax/swing/text/html/HTMLFrameHyperlinkEvent.java:1.1	Fri Mar 11 20:04:53 2005
+++ kaffe/libraries/javalib/javax/swing/text/html/HTMLFrameHyperlinkEvent.java	Tue Apr 19 17:00:00 2005
@@ -65,8 +65,7 @@
    * @param frame - the Frame to display the document in.
    */
   public HTMLFrameHyperlinkEvent(Object source, EventType type, URL url,
-                                 Element element, String frame
-                                )
+                                 Element element, String frame)
   {
     super(source, type, url, frame, element);
     target_frame = frame;
@@ -81,8 +80,7 @@
    * @param frame - the Frame to display the document in.
    */
   public HTMLFrameHyperlinkEvent(Object source, EventType type, URL url,
-                                 String frame
-                                )
+                                 String frame)
   {
     super(source, type, url, frame);
     target_frame = frame;
@@ -100,8 +98,7 @@
    */
   public HTMLFrameHyperlinkEvent(Object source, EventType type, URL url,
                                  String description, Element element,
-                                 String frame
-                                )
+                                 String frame)
   {
     super(source, type, url, description, element);
     target_frame = frame;
@@ -117,8 +114,7 @@
    * @param frame - the Frame to display the document in.
    */
   public HTMLFrameHyperlinkEvent(Object source, EventType type, URL url,
-                                 String description, String frame
-                                )
+                                 String description, String frame)
   {
     super(source, type, url, description);
     target_frame = frame;
Index: kaffe/libraries/javalib/javax/swing/text/html/parser/AttributeList.java
diff -u kaffe/libraries/javalib/javax/swing/text/html/parser/AttributeList.java:1.2 kaffe/libraries/javalib/javax/swing/text/html/parser/AttributeList.java:1.3
--- kaffe/libraries/javalib/javax/swing/text/html/parser/AttributeList.java:1.2	Tue Mar 15 02:41:00 2005
+++ kaffe/libraries/javalib/javax/swing/text/html/parser/AttributeList.java	Tue Apr 19 17:00:01 2005
@@ -42,8 +42,8 @@
 
 import java.io.Serializable;
 
-import java.util.Vector;
 import java.util.Enumeration;
+import java.util.Vector;
 
 /**
  * <p>
@@ -69,11 +69,11 @@
  * </p>
  * @author Audrius Meskauskas, Lithuania (AudriusA at Bioinformatics.org)
  */
-public class AttributeList
+public final class AttributeList
   implements DTDConstants, Serializable
 {
   /** Maps between type names and they string values. */
-  private final static gnuStringIntMapper mapper =
+  private static final gnuStringIntMapper mapper =
     new gnuStringIntMapper()
     {
       protected void create()
@@ -97,7 +97,7 @@
     };
 
   /** Use serialVersionUID for interoperability. */
-  private final static long serialVersionUID = -1361214058742015233L;
+  private static final long serialVersionUID = -1361214058742015233L;
 
   /**
    * The value of ( = pointer to ) the next attribute in the linked list,
Index: kaffe/libraries/javalib/javax/swing/text/html/parser/ContentModel.java
diff -u kaffe/libraries/javalib/javax/swing/text/html/parser/ContentModel.java:1.1 kaffe/libraries/javalib/javax/swing/text/html/parser/ContentModel.java:1.2
--- kaffe/libraries/javalib/javax/swing/text/html/parser/ContentModel.java:1.1	Fri Mar 11 20:04:54 2005
+++ kaffe/libraries/javalib/javax/swing/text/html/parser/ContentModel.java	Tue Apr 19 17:00:02 2005
@@ -51,8 +51,8 @@
  * following way:
  * <pre>
  * a = new ContentModel('+', A, null); // a reprensents A+
- * b = new ContentModel('&', B, a); // b represents B & A+
- * c = new ContentModel('*', b, null); // c represents ( B & A+) *
+ * b = new ContentModel('&amp;', B, a); // b represents B &amp; A+
+ * c = new ContentModel('*', b, null); // c represents ( B &amp; A+) *
  * d = new ContentModel('|', new ContentModel('*', A, null),
  *          new ContentModel('?', B, null)); // d represents ( A* | B? )
  * </pre>
@@ -65,7 +65,7 @@
  * <li><code>A|B</code> both A and B are permitted in any order.
  * The '|' alone does not permit the repetetive occurence of A or B
  * (use <code>(A|B)*</code>.</li>
- * <li><code>A&B both A and B must occur once (in any order)</li>
+ * <li><code>A&amp;B</code> both A and B must occur once (in any order)</li>
  * </ul>
  * @author Audrius Meskauskas, Lithuania (AudriusA at Bioinformatics.org)
  */
@@ -73,11 +73,11 @@
   implements Serializable
 {
   /** Use serialVersionUID for interoperability. */
-  private final static long serialVersionUID = -1130825523866321257L;
+  private static final long serialVersionUID = -1130825523866321257L;
 
   /**
    * The next content model model ( = pointer to the next element of
-   * the linked list) for the binary expression (',','&' or '|'). Null
+   * the linked list) for the binary expression (',','&amp;' or '|'). Null
    * for the last element in the list.
    */
   public ContentModel next;
@@ -105,8 +105,8 @@
    * Examples:
    *<code>
    * a = new ContentModel('+', A, null); // a reprensents A+
-   * b = new ContentModel('&', B, a);    // b represents  B & A+
-   * c = new ContentModel('*', b, null); // c represents  ( B & A+) *
+   * b = new ContentModel('&amp;', B, a);    // b represents  B &amp; A+
+   * c = new ContentModel('*', b, null); // c represents  ( B &amp; A+) *
    * d = new ContentModel('|', A,
    *    new ContentModel('?',b, null);
    *     // d represents
@@ -130,7 +130,7 @@
 
   /**
    * Create a content model, involving binary expression of the given type.
-   * @param a_type The expression operation type ( ',', '|' or '&').
+   * @param a_type The expression operation type ( ',', '|' or '&amp;').
    * @param a_content The content of the left part of the expression.
    * @param a_next The content model, representing the right part of the
    * expression.
Index: kaffe/libraries/javalib/javax/swing/text/html/parser/DTD.java
diff -u kaffe/libraries/javalib/javax/swing/text/html/parser/DTD.java:1.1 kaffe/libraries/javalib/javax/swing/text/html/parser/DTD.java:1.2
--- kaffe/libraries/javalib/javax/swing/text/html/parser/DTD.java:1.1	Fri Mar 11 20:04:54 2005
+++ kaffe/libraries/javalib/javax/swing/text/html/parser/DTD.java	Tue Apr 19 17:00:02 2005
@@ -42,11 +42,8 @@
 import java.io.EOFException;
 import java.io.IOException;
 import java.io.ObjectInputStream;
-import java.io.Serializable;
-
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
-
 import java.util.BitSet;
 import java.util.Hashtable;
 import java.util.StringTokenizer;
@@ -79,7 +76,7 @@
  * @author Audrius Meskauskas, Lithuania (AudriusA at Bioinformatics.org)
  */
 public class DTD
-  implements DTDConstants, Serializable
+  implements DTDConstants
 {
   /**
    * The version of the persistent data format.
@@ -201,8 +198,7 @@
    */
   public Element getElement(String element_name)
   {
-    Element e = newElement(element_name);
-    return e;
+    return newElement(element_name);
   }
 
   /**
Index: kaffe/libraries/javalib/javax/swing/text/html/parser/DTDConstants.java
diff -u kaffe/libraries/javalib/javax/swing/text/html/parser/DTDConstants.java:1.1 kaffe/libraries/javalib/javax/swing/text/html/parser/DTDConstants.java:1.2
--- kaffe/libraries/javalib/javax/swing/text/html/parser/DTDConstants.java:1.1	Fri Mar 11 20:04:54 2005
+++ kaffe/libraries/javalib/javax/swing/text/html/parser/DTDConstants.java	Tue Apr 19 17:00:02 2005
@@ -35,9 +35,8 @@
 obligated to do so.  If you do not wish to do so, delete this
 exception statement from your version. */
 
- 
-package javax.swing.text.html.parser;
 
+package javax.swing.text.html.parser;
 
 /**
  * <p>This class defines the SGML basic types, used for describing HTML 4.01
Index: kaffe/libraries/javalib/javax/swing/text/html/parser/Element.java
diff -u kaffe/libraries/javalib/javax/swing/text/html/parser/Element.java:1.1 kaffe/libraries/javalib/javax/swing/text/html/parser/Element.java:1.2
--- kaffe/libraries/javalib/javax/swing/text/html/parser/Element.java:1.1	Fri Mar 11 20:04:54 2005
+++ kaffe/libraries/javalib/javax/swing/text/html/parser/Element.java	Tue Apr 19 17:00:02 2005
@@ -65,7 +65,7 @@
   /**
    * Package level mapper between type names and they string values.
    */
-  final static gnuStringIntMapper mapper =
+  static final gnuStringIntMapper mapper =
     new gnuStringIntMapper()
     {
       protected void create()
@@ -78,7 +78,7 @@
     };
 
   /** Use serialVersionUID for interoperability. */
-  private final static long serialVersionUID = -6717939384601675586L;
+  private static final long serialVersionUID = -6717939384601675586L;
 
   /**
    * The element attributes.
Index: kaffe/libraries/javalib/javax/swing/text/html/parser/Parser.java
diff -u kaffe/libraries/javalib/javax/swing/text/html/parser/Parser.java:1.2 kaffe/libraries/javalib/javax/swing/text/html/parser/Parser.java:1.3
--- kaffe/libraries/javalib/javax/swing/text/html/parser/Parser.java:1.2	Tue Mar 15 02:41:00 2005
+++ kaffe/libraries/javalib/javax/swing/text/html/parser/Parser.java	Tue Apr 19 17:00:02 2005
@@ -1,4 +1,4 @@
-/* Parser.java -- HTML parser.
+/* Parser.java -- HTML parser
    Copyright (C) 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
@@ -34,12 +34,7 @@
 this exception to your version of the library, but you are not
 obligated to do so.  If you do not wish to do so, delete this
 exception statement from your version. */
- 
-/*
-* FOR DEVELOPERS: To avoid regression, please run the package test
-* textsuite/javax.swing.text.html.parser/AllParserTests after your
-* modifications.
-*/
+
 
 package javax.swing.text.html.parser;
 
@@ -49,6 +44,12 @@
 import javax.swing.text.ChangedCharSetException;
 import javax.swing.text.SimpleAttributeSet;
 
+/*
+ * FOR DEVELOPERS: To avoid regression, please run the package test
+ * textsuite/javax.swing.text.html.parser/AllParserTests after your
+ * modifications.
+ */
+
 /**
  * <p>A simple error-tolerant HTML parser that uses a DTD document
  * to access data on the possible tokens, arguments and syntax.</p>
@@ -159,7 +160,7 @@
           }
 
           protected final void startTag(TagElement tag)
-                                 throws ChangedCharSetException
+            throws ChangedCharSetException
           {
             j.startTag(tag);
           }
@@ -188,7 +189,7 @@
    * @throws IOException If the reader throws one.
    */
   public synchronized void parse(Reader reader)
-                          throws IOException
+    throws IOException
   {
     gnu.parse(reader);
   }
@@ -199,7 +200,7 @@
    * @throws java.io.IOException
    */
   public String parseDTDMarkup()
-                        throws IOException
+    throws IOException
   {
     return gnu.parseDTDMarkup();
   }
@@ -211,8 +212,8 @@
    * @return true if this is a valid DTD markup declaration.
    * @throws IOException
    */
-  public boolean parseMarkupDeclarations(StringBuffer strBuff)
-                                  throws IOException
+  protected boolean parseMarkupDeclarations(StringBuffer strBuff)
+    throws IOException
   {
     return gnu.parseMarkupDeclarations(strBuff);
   }
@@ -330,7 +331,7 @@
    * @throws javax.swing.text.ChangedCharSetException
    */
   protected void handleEmptyTag(TagElement tag)
-                         throws javax.swing.text.ChangedCharSetException
+    throws ChangedCharSetException
   {
   }
 
@@ -429,7 +430,7 @@
    * @param The tag
    */
   protected void startTag(TagElement tag)
-                   throws ChangedCharSetException
+    throws ChangedCharSetException
   {
   }
 }
Index: kaffe/libraries/javalib/javax/swing/text/html/parser/ParserDelegator.java
diff -u kaffe/libraries/javalib/javax/swing/text/html/parser/ParserDelegator.java:1.2 kaffe/libraries/javalib/javax/swing/text/html/parser/ParserDelegator.java:1.3
--- kaffe/libraries/javalib/javax/swing/text/html/parser/ParserDelegator.java:1.2	Fri Mar 11 20:04:54 2005
+++ kaffe/libraries/javalib/javax/swing/text/html/parser/ParserDelegator.java	Tue Apr 19 17:00:02 2005
@@ -1,5 +1,5 @@
 /* ParserDelegator.java -- Delegator for ParserDocument.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+    Copyright (C) 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -35,7 +35,6 @@
 obligated to do so.  If you do not wish to do so, delete this
 exception statement from your version. */
 
-
 package javax.swing.text.html.parser;
 
 import gnu.javax.swing.text.html.parser.HTML_401F;
@@ -65,7 +64,7 @@
   private class gnuParser
     extends gnu.javax.swing.text.html.parser.support.Parser
   {
-    private final static long serialVersionUID = 1;
+    private static final long serialVersionUID = 1;
 
     private gnuParser(DTD d)
     {
@@ -121,7 +120,8 @@
   /**
    * Use serialVersionUID for interoperability.
    */
-  private final static long serialVersionUID = -1276686502624777206L;
+  private static final long serialVersionUID = -1276686502624777206L;
+
   private static DTD dtd = HTML_401F.getInstance();
 
   /**
Index: kaffe/libraries/javalib/javax/swing/text/rtf/RTFParser.java
diff -u kaffe/libraries/javalib/javax/swing/text/rtf/RTFParser.java:1.1 kaffe/libraries/javalib/javax/swing/text/rtf/RTFParser.java:1.2
--- kaffe/libraries/javalib/javax/swing/text/rtf/RTFParser.java:1.1	Tue Mar  8 22:40:40 2005
+++ kaffe/libraries/javalib/javax/swing/text/rtf/RTFParser.java	Tue Apr 19 17:00:04 2005
@@ -41,8 +41,9 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Reader;
-import javax.swing.text.Document;
+
 import javax.swing.text.BadLocationException;
+import javax.swing.text.Document;
 
 /**
  * Parses an RTF file into a {@link Document}. The parser utilizes
Index: kaffe/libraries/javalib/javax/swing/text/rtf/RTFScanner.java
diff -u kaffe/libraries/javalib/javax/swing/text/rtf/RTFScanner.java:1.1 kaffe/libraries/javalib/javax/swing/text/rtf/RTFScanner.java:1.2
--- kaffe/libraries/javalib/javax/swing/text/rtf/RTFScanner.java:1.1	Tue Mar  8 22:40:40 2005
+++ kaffe/libraries/javalib/javax/swing/text/rtf/RTFScanner.java	Tue Apr 19 17:00:04 2005
@@ -38,13 +38,11 @@
 
 package javax.swing.text.rtf;
 
-import java.io.BufferedInputStream;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.Reader;
-
 
 /**
  * Provides a scanner that scans an {@link InputStream} for tokens of the
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3885 kaffe/ChangeLog:1.3886
--- kaffe/ChangeLog:1.3885	Tue Apr 19 16:58:00 2005
+++ kaffe/ChangeLog	Tue Apr 19 16:59:51 2005
@@ -4,6 +4,35 @@
 
 	2005-04-12  Michael Koch  <konqueror at gmx.de>
 
+        * javax/swing/text/html/HTMLFrameHyperlinkEvent.java:
+        Reformatted.
+        * javax/swing/text/html/parser/AttributeList.java:
+        Fixed order of modifiers.
+        (AttributeList): Made final.
+        * javax/swing/text/html/parser/ContentModel.java:
+        Fixed html characters in javadocs.
+        * javax/swing/text/html/parser/DTD.java
+        (DTD): Don't implement java.io.Serializable directly.
+        (getElement): Simplified.
+        * javax/swing/text/html/parser/DTDConstants.java:
+        Reformatted file.
+        * javax/swing/text/html/parser/Element.java:
+        Fixed order of modifiers.
+        * javax/swing/text/html/parser/Parser.java:
+        Reformatted. Don't use fully-qualified class names.
+        * javax/swing/text/html/parser/ParserDelegator.java:
+        Fixed order of modifiers.
+        * javax/swing/text/rtf/RTFParser.java:
+        Re-ordered import statements.
+        * javax/swing/text/rtf/RTFScanner.java:
+        Removed unused import statement.
+
+2005-04-19  Dalibor Topic  <robilad at kaffe.org>
+
+        Resynced with GNU Classpath.
+
+	2005-04-12  Michael Koch  <konqueror at gmx.de>
+
         * java/awt/image/RasterOp.java:
         Fixed wrong formatting.
 




More information about the kaffe mailing list