Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

more

  • Loading branch information...
commit fa1c4f2ea28267ac9d9e41e11132de6d6821c21a 1 parent f66c247
@patriot1burke patriot1burke authored
View
12 jaxrs/resteasy-jaxrs/src/main/java/org/jboss/resteasy/core/ThreadLocalResteasyProviderFactory.java
@@ -66,6 +66,18 @@ public Interceptors getClientInterceptors()
}
@Override
+ public void addExceptionMapper(ExceptionMapper provider, Class providerClass)
+ {
+ getDelegate().addExceptionMapper(provider, providerClass);
+ }
+
+ @Override
+ public void addStringConverter(StringConverter provider, Class providerClass)
+ {
+ getDelegate().addStringConverter(provider, providerClass);
+ }
+
+ @Override
public void addExceptionMapper(ExceptionMapper provider, Type exceptionType)
{
getDelegate().addExceptionMapper(provider, exceptionType);
View
19 jaxrs/resteasy-jaxrs/src/main/java/org/jboss/resteasy/spi/ResteasyProviderFactory.java
@@ -610,15 +610,21 @@ public void addMessageBodyWriter(MessageBodyWriter provider, Class providerClass
public void addExceptionMapper(Class<? extends ExceptionMapper> providerClass)
{
ExceptionMapper provider = getProviderInstance(providerClass);
- addExceptionMapper(provider);
+ addExceptionMapper(provider, providerClass);
}
public void addExceptionMapper(ExceptionMapper provider)
{
- Type exceptionType = Types.getActualTypeArgumentsOfAnInterface(provider.getClass(), ExceptionMapper.class)[0];
+ addExceptionMapper(provider, provider.getClass());
+ }
+
+ public void addExceptionMapper(ExceptionMapper provider, Class providerClass)
+ {
+ Type exceptionType = Types.getActualTypeArgumentsOfAnInterface(providerClass, ExceptionMapper.class)[0];
addExceptionMapper(provider, exceptionType);
}
+
public void addExceptionMapper(ExceptionMapper provider, Type exceptionType)
{
providers.put(provider.getClass(), provider);
@@ -723,12 +729,17 @@ public void injectProperties(Object o)
public void addStringConverter(Class<? extends StringConverter> resolver)
{
StringConverter writer = getProviderInstance(resolver);
- addStringConverter(writer);
+ addStringConverter(writer, resolver);
}
public void addStringConverter(StringConverter provider)
{
- Type parameter = Types.getActualTypeArgumentsOfAnInterface(provider.getClass(), StringConverter.class)[0];
+ addStringConverter(provider, provider.getClass());
+ }
+
+ public void addStringConverter(StringConverter provider, Class providerClass)
+ {
+ Type parameter = Types.getActualTypeArgumentsOfAnInterface(providerClass, StringConverter.class)[0];
addStringConverter(provider, parameter);
}
Please sign in to comment.
Something went wrong with that request. Please try again.