[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: Fix BasicStroke.hashCode() for null dash
From: |
Mark Wielaard |
Subject: |
[cp-patches] FYI: Fix BasicStroke.hashCode() for null dash |
Date: |
Sun, 13 Feb 2005 00:02:44 +0100 |
Hi,
As pointed out by the bug report BasicStroke.hashCode() didn't handle a
null dash. Fixed by:
2005-02-12 Mark Wielaard <address@hidden>
Fixes bug #11949
* java/awt/BasicStroke.java (hashCode): Check for null dash.
Committed,
Mark
Index: java/awt/BasicStroke.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/BasicStroke.java,v
retrieving revision 1.6
diff -u -r1.6 BasicStroke.java
--- java/awt/BasicStroke.java 20 Jan 2005 12:40:44 -0000 1.6
+++ java/awt/BasicStroke.java 12 Feb 2005 23:00:05 -0000
@@ -222,9 +222,10 @@
hash ^= cap;
hash ^= join;
hash ^= Float.floatToIntBits(limit);
-
- for (int i = 0; i < dash.length; i++)
- hash ^= Float.floatToIntBits(dash[i]);
+
+ if (dash != null)
+ for (int i = 0; i < dash.length; i++)
+ hash ^= Float.floatToIntBits(dash[i]);
hash ^= Float.floatToIntBits(phase);
signature.asc
Description: This is a digitally signed message part
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: Fix BasicStroke.hashCode() for null dash,
Mark Wielaard <=