core/src/main/java/org/jclouds/rest/internal/TransformerForRequest.java:

Fix for Java 1.8 and Guice 4.1. Not sure if this is correct, but does
compile. Committing to see if it passes tests to confirm fix or not.

Modified per @nacx on jclouds PR1036
https://github.com/jclouds/jclouds/pull/1036#issuecomment-319904820
This commit is contained in:
William L. Thomson Jr 2016-11-08 14:05:45 -05:00 committed by Ignasi Barrera
parent 7e496723ab
commit 6de7974a66
1 changed files with 2 additions and 1 deletions

View File

@ -85,7 +85,8 @@ public class TransformerForRequest implements Function<HttpRequest, Function<Htt
Class<? extends HandlerWithResult<?>> handler = getSaxResponseParserClassOrNull(request.getInvocation()
.getInvokable());
if (handler != null) {
transformer = parserFactory.create(injector.getInstance(handler));
HandlerWithResult<?> h = injector.getInstance(handler);
transformer = parserFactory.create(h);
} else {
transformer = getTransformerForMethod(request.getInvocation(), injector);
}