Commit 7041917
committed
Add explicit type check to UpdateStrategy.convert()
When using the DefaultConverter, type erasure may occur, where the
"convert" method returns an object of type S, but treats it as type D.
The conversion must fail early in such a case, in order to prevent
obscure error messages when passing the value to successive methods.
Closes eclipse-platform#30081 parent e37e158 commit 7041917
File tree
2 files changed
+21
-1
lines changed- bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding
- tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding
2 files changed
+21
-1
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
677 | 677 | | |
678 | 678 | | |
679 | 679 | | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
680 | 684 | | |
681 | 685 | | |
682 | 686 | | |
| |||
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| |||
354 | 358 | | |
355 | 359 | | |
356 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
357 | 373 | | |
0 commit comments