Commit 5e0e6a0
committed
ODFTOOLKIT-187: fix results of PuzzlePiece.extractPuzzlePieces()
This created nondeterministic and wrong results, somewhere in
reduceAttributes().
The reason appears to be that there are ordered containers like a
TreeSet<PuzzlePiece> in uniteDefinitionsWithEqualContent() involved
and the PuzzlePiece.compareTo() has a problem with overflow, so it
sometimes returns wrong results and then the TreeSet will be wrongly
sorted and it can't find some elements.
Just compare the integers properly and the result is deterministic.
(cherry picked from commit 335bab8)1 parent 8256ac4 commit 5e0e6a0
File tree
2 files changed
+2
-5
lines changed- generator/schema2template/src
- main/java/schema2template/model
- test/java/schema2template/example/odf
2 files changed
+2
-5
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | | - | |
| 56 | + | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
| |||
155 | 154 | | |
156 | 155 | | |
157 | 156 | | |
158 | | - | |
159 | 157 | | |
160 | 158 | | |
161 | 159 | | |
| |||
189 | 187 | | |
190 | 188 | | |
191 | 189 | | |
192 | | - | |
193 | 190 | | |
194 | 191 | | |
195 | 192 | | |
| |||
0 commit comments