Ensure test compatibility with JAX-RS 2.0
JAX-RS 2.1 defaults the no-longer-used getSize method to -1, but in
order to run an JAX-RS 2.0, we must have an implementation of this
method.
@@ -52,6 +52,12 @@ public class HighPriorityMBW implements MessageBodyWriter<MyObject> {
return id;
}
+ @Override
+ public long getSize(MyObject o, Class<?> type, Type genericType,
+ Annotation[] annotations, MediaType mediaType) {
+ return -1;
+ }
+
@Override
public boolean isWriteable(Class<?> type, Type genericType,
Annotation[] annotations, MediaType mediaType) {
