A hacky solution was introduced in #944. It works for now, but it will break if the Ion 1.1 system symbol table gets significantly larger.
|
// FIXME: This is a hack that works as long as our system symbol table doesn't grow to |
|
// more than ~95 symbols. We need this hack because when we have to read the FixedInt, |
|
// we don't know whether it's a tagless FlexSym or a Regular value. |
|
// Possible solutions include: |
|
// * changing the spec so that FlexSym System SIDs line up with the regular System SIDs |
|
// * Introducing a dummy IonTypeID that indicates that we need to add the bias |
|
// * Update IonCursorBinary.slowSkipFlexSym_1_1() to put the id into valueMarker.endIndex, |
|
// though that seems to have its own problems. |
|
if (id >= FLEX_SYM_SYSTEM_SYMBOL_OFFSET) { |
|
id = id - FLEX_SYM_SYSTEM_SYMBOL_OFFSET; |
|
} |
Part of the fix may involve solving this problem:
|
// FIXME: See if we can set the SID in the endIndex here without causing the slow reader to get confused |
|
// about where the end of the value is for tagless symbols. |
|
// I.e. use setSystemSymbolMarker(markerToSet, (byte)(specialByte - FLEX_SYM_SYSTEM_SYMBOL_OFFSET)); |
|
markerToSet.typeId = SYSTEM_SYMBOL_VALUE; |
|
markerToSet.startIndex = peekIndex - 1; |
A hacky solution was introduced in #944. It works for now, but it will break if the Ion 1.1 system symbol table gets significantly larger.
ion-java/src/main/java/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java
Lines 2457 to 2467 in c5562bf
Part of the fix may involve solving this problem:
ion-java/src/main/java/com/amazon/ion/impl/IonCursorBinary.java
Lines 1737 to 1741 in c5562bf