According to JAX-RS API 2.0 documentation the ContainerRequestContext.hasEntity() should return true only, when there is non-empty entity input stream available.
But ContainerRequestContextImpl always returns true for any non-GET request even if there is no entity passed with request - check ContainerRequestContextImpl.java:70:
This happens due to the fact that getEntityStream() is never null. It always returns a DelegatingInputStream wrapper around javax.servlet.ServletInputStream put in message in AbstractHTTPDestination - check AbstractHTTPDestination.java:298:
Thus method contract is not satisfied. Presence of input stream doesn't mean that this stream has content. Implementation should check that there is indeed non-empty entity stream, e.g. via checking EOF using read() (obviously caching results for actual consumer).
N.B.: I believe the same issue affects ClientResponseContextImpl - check ClientResponseContextImpl.java:62: