Project: SWT
Bug 30924 StyledText - StyleRange hashCode throws NullPointerException
Reported: 2003-02-04 18:37:03 | Status: resolved fixed

The implementation of StyleRange's hashCode method assumes the object has a foreground and background color. This is a bad assumption. When trying to put StyleRanges without a foreground or background color into a java.util.Set, a NullPointerException is thrown.

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyleRange.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyleRange.java