|
RESTEasy(4.5.3.Final)
|
JERSEY(2.30.1)
|
getEntity()
|
|
|
Response.ok(new
MyObject()).build(), getEntity() -> the given MyObject instance
|
OK
|
OK
|
Response.accepted(new
MyObject()).build(), getEntity() -> the given MyObject instance
|
OK
|
OK
|
Response.ok.entity(new
MyObject()).build(), getEntity() -> the given MyObject instance
|
OK
|
OK
|
getEntity()/readEntity(InputStream.class) ->
InputStream, InputStream fully consumed
(while(inputStream.read()!=-1){}), getEntity() ->
IllegalStateException
|
OK
|
KO
|
close(), getEntity()
-> IllegalStateException
|
OK
|
OK (wrong message)
|
bufferEntity(), getEntity() -> a copy of the
reset buffered entity input stream
|
OK
|
KO (returns the buffered entity input stream not
reset)
|
bufferEntity()
|
|
|
getEntity()/readEntity(InputStream.class) ->
InputStream, InputStream not consumed at all, bufferEntity() ->
true
|
OK
|
OK
|
getEntity()/readEntity(InputStream.class) ->
InputStream, InputStream fully consumed
(while(inputStream.read()!=-1){}), bufferEntity() -> false
|
OK
|
KO
|
getEntity()/readEntity(InputStream.class) ->
InputStream, InputStream partially consumed
(inputStream.read()!=-1), bufferEntity() -> false
|
OK
|
KO
|
readEntity()
|
|
|
hasEntity()-> true, readEntity(Foo.class) ->
Foo, hasEntity()-> true
|
KO (closes the response instead of just
closing the entity inputStream)
|
KO (closes the response instead of just
closing the entity inputStream)
|
readEntity(InputStream.class) -> InputStream,
readEntity(InputStream.class) -> InputStream
|
OK
|
OK
|
readEntity(Foo.class) -> Foo,
readEntity(Foo.class) -> IllegalStateException
|
OK (False positive. Actually,
IllegalStateException is thrown because implemenation closes the
response (see next case))
|
OK (False positive. Actually,
IllegalStateException is thrown because implemenation closes the
response (see next case))
|
readEntity(Foo.class) ->
Foo, readEntity(Foo.class) -> IllegalStateException,
hasEntity()-> true
|
KO
|
KO
|
bufferEntity(), readEntity(Foo.class) -> Foo,
readEntity(Foo.class)-> Foo
|
OK
|
OK
|
getEntity()/readEntity(InputStream.class) ->
InputStream, InputStream not consumed at all,
readEntity(Foo.class) -> Foo
|
OK
|
OK
|
getEntity()/readEntity(InputStream.class) ->
InputStream, InputStream fully consumed
(while(inputStream.read()!=-1){}), readEntity(Foo.class) -> IllegalStateException
|
KO
|
KO
|
getEntity()/readEntity(InputStream.class) ->
InputStream, InputStream partially consumed (inputStream.read()),
readEntity(Foo.class) -> partial result(e.g. if Foo is String)
or ProcessingException
|
OK
|
OK
|