Skip to content

Commit be43867

Browse files
committed
Fix #216: need to retain or recalculate need for rehashing (chose to recalc when unsharing)
1 parent 7ca3d1c commit be43867

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

release-notes/VERSION

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ JSON library.
1818

1919
#213: Parser is sometimes wrong when using CANONICALIZE_FIELD_NAMES
2020
(reported by ichernev@github)
21+
#216: ArrayIndexOutOfBoundsException: 128 when repeatedly serializing to a byte array
22+
(reported by geekbeast@github)
2123

2224
2.6.1 (09-Aug-2015)
2325

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -877,12 +877,15 @@ private void _verifySharing()
877877
_hashArea = Arrays.copyOf(_hashArea, _hashArea.length);
878878
_names = Arrays.copyOf(_names, _names.length);
879879
_hashShared = false;
880+
// 09-Sep-2015, tatu: As per [jackson-core#216], also need to ensure
881+
// we rehash as needed, as need-rehash flag is not copied from parent
882+
_verifyNeedForRehash();
880883
}
881884
if (_needRehash) {
882885
rehash();
883886
}
884887
}
885-
888+
886889
/**
887890
* Method called to find the location within hash table to add a new symbol in.
888891
*/

0 commit comments

Comments
 (0)