Skip to content

Commit

Permalink
Yet more fixing for #506.. :)
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Aug 14, 2014
1 parent 712905e commit e88a87c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public Object[] deserialize(JsonParser jp, DeserializationContext ctxt)
chunk[ix++] = value;
}
} catch (Exception e) {
throw JsonMappingException.wrapWithPath(e, chunk, ix);
throw JsonMappingException.wrapWithPath(e, chunk, buffer.bufferedSize() + ix);
}

Object[] result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public boolean[] deserialize(JsonParser jp, DeserializationContext ctxt)
chunk[ix++] = value;
}
} catch (Exception e) {
throw JsonMappingException.wrapWithPath(e, chunk, ix);
throw JsonMappingException.wrapWithPath(e, chunk, builder.bufferedSize() + ix);
}
return builder.completeAndClearBuffer(chunk, ix);
}
Expand Down Expand Up @@ -245,7 +245,7 @@ public byte[] deserialize(JsonParser jp, DeserializationContext ctxt)
chunk[ix++] = value;
}
} catch (Exception e) {
throw JsonMappingException.wrapWithPath(e, chunk, ix);
throw JsonMappingException.wrapWithPath(e, chunk, builder.bufferedSize() + ix);
}
return builder.completeAndClearBuffer(chunk, ix);
}
Expand Down Expand Up @@ -308,7 +308,7 @@ public short[] deserialize(JsonParser jp, DeserializationContext ctxt)
chunk[ix++] = value;
}
} catch (Exception e) {
throw JsonMappingException.wrapWithPath(e, chunk, ix);
throw JsonMappingException.wrapWithPath(e, chunk, builder.bufferedSize() + ix);
}
return builder.completeAndClearBuffer(chunk, ix);
}
Expand Down Expand Up @@ -362,7 +362,7 @@ public int[] deserialize(JsonParser jp, DeserializationContext ctxt)
chunk[ix++] = value;
}
} catch (Exception e) {
throw JsonMappingException.wrapWithPath(e, chunk, ix);
throw JsonMappingException.wrapWithPath(e, chunk, builder.bufferedSize() + ix);
}
return builder.completeAndClearBuffer(chunk, ix);
}
Expand Down Expand Up @@ -415,7 +415,7 @@ public long[] deserialize(JsonParser jp, DeserializationContext ctxt)
chunk[ix++] = value;
}
} catch (Exception e) {
throw JsonMappingException.wrapWithPath(e, chunk, ix);
throw JsonMappingException.wrapWithPath(e, chunk, builder.bufferedSize() + ix);
}
return builder.completeAndClearBuffer(chunk, ix);
}
Expand Down Expand Up @@ -467,7 +467,7 @@ public float[] deserialize(JsonParser jp, DeserializationContext ctxt)
chunk[ix++] = value;
}
} catch (Exception e) {
throw JsonMappingException.wrapWithPath(e, chunk, ix);
throw JsonMappingException.wrapWithPath(e, chunk, builder.bufferedSize() + ix);
}
return builder.completeAndClearBuffer(chunk, ix);
}
Expand Down Expand Up @@ -518,7 +518,7 @@ public double[] deserialize(JsonParser jp, DeserializationContext ctxt)
chunk[ix++] = value;
}
} catch (Exception e) {
throw JsonMappingException.wrapWithPath(e, chunk, ix);
throw JsonMappingException.wrapWithPath(e, chunk, builder.bufferedSize() + ix);
}
return builder.completeAndClearBuffer(chunk, ix);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public final class StringArrayDeserializer
extends StdDeserializer<String[]>
implements ContextualDeserializer
{
private static final long serialVersionUID = -7589512013334920693L;
private static final long serialVersionUID = 1L;

public final static StringArrayDeserializer instance = new StringArrayDeserializer();

Expand Down Expand Up @@ -74,7 +74,7 @@ public String[] deserialize(JsonParser jp, DeserializationContext ctxt) throws I
chunk[ix++] = value;
}
} catch (Exception e) {
throw JsonMappingException.wrapWithPath(e, chunk, ix);
throw JsonMappingException.wrapWithPath(e, chunk, buffer.bufferedSize() + ix);
}
String[] result = buffer.completeAndClearBuffer(chunk, ix, String.class);
ctxt.returnObjectBuffer(buffer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ protected PrimitiveArrayBuilder() { }
/**********************************************************
*/

public int bufferedSize() { return _bufferedEntryCount; }

public T resetAndStart()
{
_reset();
Expand Down

0 comments on commit e88a87c

Please sign in to comment.