classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] [generics] Patch: FYI: minor java.awt.image fixes


From: Tom Tromey
Subject: [cp-patches] [generics] Patch: FYI: minor java.awt.image fixes
Date: 24 Oct 2005 18:42:52 -0600

I'm checking this in on the generics branch.

This genericizes a couple of java.awt.image methods.

Tom


2005-10-24  Tom Tromey  <address@hidden>

        * java/awt/image/ReplicateScaleFilter.java (setProperties): Changed
        argument type.
        * java/awt/image/CropImageFilter.java (setProperties): Changed
        argument type.

Index: java/awt/image/CropImageFilter.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/image/CropImageFilter.java,v
retrieving revision 1.6.2.3
diff -u -r1.6.2.3 CropImageFilter.java
--- java/awt/image/CropImageFilter.java 10 Sep 2005 15:31:45 -0000      1.6.2.3
+++ java/awt/image/CropImageFilter.java 25 Oct 2005 00:46:58 -0000
@@ -91,11 +91,12 @@
      *
      * @param props the list of properties associated with this image 
      */
-    public void setProperties(Hashtable props)
+    public void setProperties(Hashtable<?, ?> props)
     {
-       props.put("filters", "CropImageFilter");
-       if (consumer != null)
-         consumer.setProperties(props);
+      Hashtable<Object, Object> prop2 = (Hashtable<Object, Object>) props;
+      prop2.put("filters", "CropImageFilter");
+      if (consumer != null)
+        consumer.setProperties(prop2);
     }
 
     /**
Index: java/awt/image/ReplicateScaleFilter.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/java/awt/image/ReplicateScaleFilter.java,v
retrieving revision 1.6.2.3
diff -u -r1.6.2.3 ReplicateScaleFilter.java
--- java/awt/image/ReplicateScaleFilter.java    10 Sep 2005 15:31:45 -0000      
1.6.2.3
+++ java/awt/image/ReplicateScaleFilter.java    25 Oct 2005 00:46:58 -0000
@@ -134,11 +134,12 @@
      *
      * @param props the list of properties associated with this image 
      */
-    public void setProperties(Hashtable props)
+    public void setProperties(Hashtable<?, ?> props)
     {
-       props.put("filters", "ReplicateScaleFilter");
-       if (consumer != null)
-         consumer.setProperties(props);
+      Hashtable<Object, Object> prop2 = (Hashtable<Object, Object>) props;
+      prop2.put("filters", "ReplicateScaleFilter");
+      if (consumer != null)
+        consumer.setProperties(prop2);
     }
 
     /**




reply via email to

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