mkarg 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_r329306349
 
 

 ##########
 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:
   I checked the code and you are right, this is something that we should 
address to prevent the O(n) overhead. I will look into that definitively, but 
to not further delay fixing of this bug (my application expects to catch 
`NoContentException` so I'm stuck without this) I'd kindly request that I may 
fix the performance regression *later this week*.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to