jdk/src/share/classes/java/awt/font/TransformAttribute.java
changeset 20091 75850d176243
parent 5506 202f599c92aa
child 21278 ef8a3a2a72f2
--- a/jdk/src/share/classes/java/awt/font/TransformAttribute.java	Thu Sep 19 09:37:13 2013 -0700
+++ b/jdk/src/share/classes/java/awt/font/TransformAttribute.java	Thu Sep 26 15:06:39 2013 -0700
@@ -141,14 +141,16 @@
      * @since 1.6
      */
     public boolean equals(Object rhs) {
-        try {
-            TransformAttribute that = (TransformAttribute)rhs;
-            if (transform == null) {
-                return that.transform == null;
+        if (rhs != null) {
+            try {
+                TransformAttribute that = (TransformAttribute)rhs;
+                if (transform == null) {
+                    return that.transform == null;
+                }
+                return transform.equals(that.transform);
             }
-            return transform.equals(that.transform);
-        }
-        catch (ClassCastException e) {
+            catch (ClassCastException e) {
+            }
         }
         return false;
     }