View | Details | Raw Unified | Return to bug 23083
Collapse All | Expand All

(-)SSTDeserializer.java (-4 / +15 lines)
Lines 132-139 Link Here
132
            if ( stringContinuesOverContinuation )
132
            if ( stringContinuesOverContinuation )
133
            {
133
            {
134
                int remainingBytes = ( initialOffset + dataSize ) - offset - stringHeaderOverhead();
134
                int remainingBytes = ( initialOffset + dataSize ) - offset - stringHeaderOverhead();
135
                setContinuationExpectedChars( charCount - calculateCharCount( remainingBytes ) );
135
                int continuationChars = charCount - calculateCharCount( remainingBytes );
136
                charCount -= getContinuationExpectedChars();
136
                if ( continuationChars > 0 )
137
                {
138
                  setContinuationExpectedChars(continuationChars);
139
                  charCount -= getContinuationExpectedChars();
140
                }
141
                else  // set number of chars to skip in next record
142
                {
143
                  setContinuationExpectedChars( remaining - totalStringSize() );
144
                }
137
            }
145
            }
138
            else
146
            else
139
            {
147
            {
Lines 238-244 Link Here
238
246
239
    private boolean isStringFinished()
247
    private boolean isStringFinished()
240
    {
248
    {
241
        return getContinuationExpectedChars() == 0;
249
        return getContinuationExpectedChars() <= 0;
242
    }
250
    }
243
251
244
    /**
252
    /**
Lines 301-308 Link Here
301
    {
309
    {
302
        if ( isStringFinished() )
310
        if ( isStringFinished() )
303
        {
311
        {
312
            // this is to skip the trailing extra info from prior string
313
            int newOffset = -getContinuationExpectedChars();
314
304
            initVars();
315
            initVars();
305
            manufactureStrings( record, 0, (short) record.length );
316
            manufactureStrings( record, newOffset, (short) ( record.length - newOffset) );
306
        }
317
        }
307
        else
318
        else
308
        {
319
        {

Return to bug 23083