rmannibucau commented on a change in pull request #52: JOHNZON-281 JAX-RS
Provider MUST throw NoContentException
URL: https://github.com/apache/johnzon/pull/52#discussion_r328741627
##########
File path:
johnzon-jsonb/src/main/java/org/apache/johnzon/jaxrs/jsonb/jaxrs/JsonbJaxrsProvider.java
##########
@@ -187,7 +189,23 @@ public long getSize(final T t, final Class<?> type, final
Type genericType, fina
@Override
public T readFrom(final Class<T> type, final Type genericType, final
Annotation[] annotations, final MediaType mediaType,
- final MultivaluedMap<String, String> httpHeaders, final
InputStream entityStream) throws IOException, WebApplicationException {
+ final MultivaluedMap<String, String> httpHeaders, InputStream
entityStream) throws IOException, WebApplicationException {
+ if (entityStream.markSupported()) {
Review comment:
The markable point is just in terms of maintenance but no other blocker so
you can keep it, just ensure it works when false ;)
The pushback overhead is indeed o(n) for the same reason an arraylist if
often replaced by an array in optimized impl (checkopened+length check), we
dont need it here so it is just wasting resources to stack them.
N is the stream size, not the buffer one ;).
Hope it is clearer.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services