Commit 9d0405c
committed
Ensure that rounding mode of Point.OfFloat is never null
When initializing a Point.OfFloat with integer values, the rounding mode
is currently set to null. This can lead to NPEs when cloning such
points, as clone() uses the rounding mode to initialize a new instance,
which expects the rounding mode to not be null. Setting values on the
point with setX() and setY() will fail likewise.
This change ensures that the rounding mode will never be initialized
with null.1 parent ce03c39 commit 9d0405c
File tree
2 files changed
+21
-1
lines changed- bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics
- tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit
2 files changed
+21
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
76 | 96 | | |
0 commit comments