--- 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;
}