@Test(expected = ResponseBodySerializerNotFoundException.class) public void assertSerializerNotFound() { ResponseBodySerializerFactory.getResponseBodySerializer("Unknown"); }
public static ResponseBodySerializer getResponseBodySerializer(final String contentType) { ResponseBodySerializer result = RESPONSE_BODY_SERIALIZERS.get(contentType); if (null == result) { synchronized (ResponseBodySerializerFactory.class) { if (null == RESPONSE_BODY_SERIALIZERS.get(contentType)) { instantiateResponseBodySerializerFromFactories(contentType); } result = RESPONSE_BODY_SERIALIZERS.get(contentType); } } if (MISSING_SERIALIZER == result) { throw new ResponseBodySerializerNotFoundException(contentType); } return result; }
ResponseBodySerializerFactory { public static ResponseBodySerializer getResponseBodySerializer(final String contentType) { ResponseBodySerializer result = RESPONSE_BODY_SERIALIZERS.get(contentType); if (null == result) { synchronized (ResponseBodySerializerFactory.class) { if (null == RESPONSE_BODY_SERIALIZERS.get(contentType)) { instantiateResponseBodySerializerFromFactories(contentType); } result = RESPONSE_BODY_SERIALIZERS.get(contentType); } } if (MISSING_SERIALIZER == result) { throw new ResponseBodySerializerNotFoundException(contentType); } return result; } }
ResponseBodySerializerFactory { public static ResponseBodySerializer getResponseBodySerializer(final String contentType) { ResponseBodySerializer result = RESPONSE_BODY_SERIALIZERS.get(contentType); if (null == result) { synchronized (ResponseBodySerializerFactory.class) { if (null == RESPONSE_BODY_SERIALIZERS.get(contentType)) { instantiateResponseBodySerializerFromFactories(contentType); } result = RESPONSE_BODY_SERIALIZERS.get(contentType); } } if (MISSING_SERIALIZER == result) { throw new ResponseBodySerializerNotFoundException(contentType); } return result; }  }
ResponseBodySerializerFactory { public static ResponseBodySerializer getResponseBodySerializer(final String contentType) { ResponseBodySerializer result = RESPONSE_BODY_SERIALIZERS.get(contentType); if (null == result) { synchronized (ResponseBodySerializerFactory.class) { if (null == RESPONSE_BODY_SERIALIZERS.get(contentType)) { instantiateResponseBodySerializerFromFactories(contentType); } result = RESPONSE_BODY_SERIALIZERS.get(contentType); } } if (MISSING_SERIALIZER == result) { throw new ResponseBodySerializerNotFoundException(contentType); } return result; }  static ResponseBodySerializer getResponseBodySerializer(final String contentType); }
ResponseBodySerializerFactory { public static ResponseBodySerializer getResponseBodySerializer(final String contentType) { ResponseBodySerializer result = RESPONSE_BODY_SERIALIZERS.get(contentType); if (null == result) { synchronized (ResponseBodySerializerFactory.class) { if (null == RESPONSE_BODY_SERIALIZERS.get(contentType)) { instantiateResponseBodySerializerFromFactories(contentType); } result = RESPONSE_BODY_SERIALIZERS.get(contentType); } } if (MISSING_SERIALIZER == result) { throw new ResponseBodySerializerNotFoundException(contentType); } return result; }  static ResponseBodySerializer getResponseBodySerializer(final String contentType);  }