Commit e96c38e
committed
fix: correct parameter index tracking in Signature validation
The index variable in Signature.validate() was incremented at the
end of the for loop, but the capture group was read using the
pre-increment value. When the first argument is an array (type 'a')
and the second is a function (type 'f'), the function argument was
validated against group(1) instead of group(2), causing a false
T0410 signature mismatch error.
Fix: use post-increment (index++) inline at the point where the
capture group is read, and remove the redundant index++ at the
end of the loop.
Also fix DateTimeTest.testToMillis assertion to be timezone-agnostic.
Fixes #791 parent 0b40af3 commit e96c38e
3 files changed
Lines changed: 18 additions & 4 deletions
File tree
- src
- main/java/com/dashjoin/jsonata/utils
- test/java/com/dashjoin/jsonata
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
| 316 | + | |
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | | - | |
395 | 394 | | |
396 | 395 | | |
397 | | - | |
| 396 | + | |
398 | 397 | | |
399 | 398 | | |
400 | 399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
59 | 74 | | |
60 | 75 | | |
61 | 76 | | |
| |||
0 commit comments