Skip to content

Commit cfeaed0

Browse files
committed
Fix #213 (name collision for long names, 12+ characters)
1 parent 6f496e7 commit cfeaed0

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

release-notes/CREDITS

+4
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,7 @@ Ruediger Moeller (RuedigerMoeller@github)
6666
Florian Schoppmann (fschopp@github@github)
6767
* Reported #207: `ArrayIndexOutOfBoundsException` in `ByteQuadsCanonicalizer`
6868
(2.6.1)
69+
70+
Iskren Ivov Chernev (ichernev@github)
71+
* Reported #213: Parser is sometimes wrong when using CANONICALIZE_FIELD_NAMES
72+
(2.6.2)

release-notes/VERSION

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ JSON library.
1414
=== Releases ===
1515
------------------------------------------------------------------------
1616

17+
2.6.2 (not yet released)
18+
19+
#213: Parser is sometimes wrong when using CANONICALIZE_FIELD_NAMES
20+
(reported by ichernev@github)
21+
1722
2.6.1 (09-Aug-2015)
1823

1924
#207: `ArrayIndexOutOfBoundsException` in `ByteQuadsCanonicalizer`

src/main/java/com/fasterxml/jackson/core/sym/ByteQuadsCanonicalizer.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,9 @@ private String _findSecondary(int origOffset, int hash, int[] q, int qlen)
702702
for (int end = offset + bucketSize; offset < end; offset += 4) {
703703
int len = hashArea[offset+3];
704704
if ((hash == hashArea[offset]) && (qlen == len)) {
705-
return _names[offset >> 2];
705+
if (_verifyLongName(q, qlen, hashArea[offset+1])) {
706+
return _names[offset >> 2];
707+
}
706708
}
707709
if (len == 0) {
708710
return null;

0 commit comments

Comments
 (0)