This repository was archived by the owner on Jun 18, 2026. It is now read-only.
Commit af41306
committed
fix: updateTime() off-by-one, BasicStroke constants, copyfile append, Random seed
- updateTime(): slider values 32-61 incorrectly produced April 31
(day never decremented to April range due to double month check).
Rewrote with clean if/else branches for March/April/May.
- BasicStroke constructor used JOIN_BEVEL (2) for the cap parameter
and JOIN_MITER (0) for join. While the numeric values happened to
map to CAP_SQUARE and JOIN_MITER, the intent was clearly CAP_BUTT
+ JOIN_BEVEL. Fixed to use correct constants.
- copyfile() opened FileOutputStream with append=true, which would
corrupt exported files if the target somehow existed. Changed to
overwrite mode (append=false).
- positionCluster() used Calendar.SECOND as Random seed, giving only
60 possible layouts and identical results within the same second.
Replaced with System.nanoTime() for proper entropy.
- Removed unused Calendar/GregorianCalendar imports.1 parent 444fb82 commit af41306
1 file changed
Lines changed: 23 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
40 | | - | |
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
| |||
310 | 308 | | |
311 | 309 | | |
312 | 310 | | |
313 | | - | |
314 | | - | |
315 | | - | |
| 311 | + | |
316 | 312 | | |
317 | 313 | | |
318 | 314 | | |
| |||
357 | 353 | | |
358 | 354 | | |
359 | 355 | | |
360 | | - | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
385 | 376 | | |
| 377 | + | |
| 378 | + | |
386 | 379 | | |
387 | 380 | | |
388 | 381 | | |
| |||
701 | 694 | | |
702 | 695 | | |
703 | 696 | | |
704 | | - | |
| 697 | + | |
705 | 698 | | |
706 | 699 | | |
707 | 700 | | |
| |||
2194 | 2187 | | |
2195 | 2188 | | |
2196 | 2189 | | |
2197 | | - | |
| 2190 | + | |
2198 | 2191 | | |
2199 | 2192 | | |
2200 | 2193 | | |
| |||
0 commit comments