classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] [generics] Patch: FYI: genericization fixes


From: Tom Tromey
Subject: [cp-patches] [generics] Patch: FYI: genericization fixes
Date: 15 Jan 2006 17:45:34 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

I'm checking this in on the generics branch.

After the recent merge to the branch, we needed a couple minor
genericization fixes.

Tom

2006-01-14  Tom Tromey  <address@hidden>

        * javax/swing/text/html/HTMLDocument.java (parseBuffer): Genericized.
        * javax/swing/text/StyleContext.java (removeAttributes): Genericized.
        * java/beans/PersistenceDelegate.java (initialize): Genericized.
        * java/beans/Encoder.java (getPersistenceDelegate): Genericized.
        (setPersistenceDelegate): Likewise.

Index: java/beans/Encoder.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/beans/Encoder.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 Encoder.java
--- java/beans/Encoder.java     10 Jan 2006 15:59:40 -0000      1.1.2.1
+++ java/beans/Encoder.java     16 Jan 2006 00:45:36 -0000
@@ -212,7 +212,7 @@
     return exceptionListener;
   }
 
-  public PersistenceDelegate getPersistenceDelegate(Class type)
+  public PersistenceDelegate getPersistenceDelegate(Class<?> type)
   {
     // This is not specified but the JDK behaves like this.
     if (type == null)
@@ -246,7 +246,8 @@
    * access is thread safe.
    * </p>
    */
-  public void setPersistenceDelegate(Class type, PersistenceDelegate delegate)
+  public void setPersistenceDelegate(Class<?> type,
+                                     PersistenceDelegate delegate)
   {
     // If the argument is null this will cause a NullPointerException
     // which is expected behavior.
Index: java/beans/PersistenceDelegate.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/beans/PersistenceDelegate.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 PersistenceDelegate.java
--- java/beans/PersistenceDelegate.java 10 Jan 2006 15:59:40 -0000      1.1.2.1
+++ java/beans/PersistenceDelegate.java 16 Jan 2006 00:45:36 -0000
@@ -52,8 +52,8 @@
 public abstract class PersistenceDelegate
 {
 
-  protected void initialize(Class type, Object oldInstance, Object newInstance,
-                            Encoder out)
+  protected void initialize(Class<?> type, Object oldInstance,
+                            Object newInstance, Encoder out)
   {
     if (type != Object.class)
       {
Index: javax/swing/text/StyleContext.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/StyleContext.java,v
retrieving revision 1.2.2.10
diff -u -r1.2.2.10 StyleContext.java
--- javax/swing/text/StyleContext.java  10 Jan 2006 15:59:43 -0000      1.2.2.10
+++ javax/swing/text/StyleContext.java  16 Jan 2006 00:45:37 -0000
@@ -673,7 +673,7 @@
     return removeAttributes(old, attributes.getAttributeNames());
   }
 
-  public AttributeSet removeAttributes(AttributeSet old, Enumeration names)
+  public AttributeSet removeAttributes(AttributeSet old, Enumeration<?> names)
   {
     if (old instanceof MutableAttributeSet)
       {
Index: javax/swing/text/html/HTMLDocument.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/html/HTMLDocument.java,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 HTMLDocument.java
--- javax/swing/text/html/HTMLDocument.java     10 Jan 2006 15:59:43 -0000      
1.1.2.4
+++ javax/swing/text/html/HTMLDocument.java     16 Jan 2006 00:45:37 -0000
@@ -527,7 +527,7 @@
     /** Holds the current character attribute set **/
     protected MutableAttributeSet charAttr = new SimpleAttributeSet();
     
-    protected Vector parseBuffer = new Vector();
+    protected Vector<ElementSpec> parseBuffer = new Vector<ElementSpec>();
     
     /** A stack for character attribute sets **/
     Stack charAttrStack = new Stack();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]