JCLOUDS-1333: Correct JDK 1.8 method overloading

Newer JDK have a different resolution process, likely due to enhanced
target type inference.  Found via:

mvn test -Dmaven.compile.source=1.8 -Dmaven.compile.target=1.8
This commit is contained in:
Andrew Gaul 2017-09-05 13:36:47 -07:00
parent 7f446a638d
commit d7d28fe7d7
7 changed files with 5 additions and 15 deletions

View File

@ -42,11 +42,6 @@ public class BindAuthToJsonPayload extends BindToJsonPayload implements MapBinde
super(jsonBinder);
}
@Override
public <R extends HttpRequest> R bindToRequest(R request, Object toBind) {
throw new IllegalStateException("BindAuthToJsonPayload needs parameters");
}
protected void addCredentialsInArgsOrNull(GeneratedHttpRequest gRequest, Builder<String, Object> builder) {
for (Object arg : Iterables.filter(gRequest.getInvocation().getArgs(), Predicates.notNull())) {
if (arg.getClass().isAnnotationPresent(CredentialType.class)) {

View File

@ -88,7 +88,7 @@ public class CreateTenantOptions implements MapBinder {
tenant.description = description;
tenant.enabled = enabled;
return bindToRequest(request, ImmutableMap.of("tenant", tenant));
return bindToRequest(request, (Object) ImmutableMap.of("tenant", tenant));
}
/**

View File

@ -101,7 +101,7 @@ public class CreateUserOptions implements MapBinder{
user.tenantId = tenant;
user.enabled = enabled;
return bindToRequest(request, ImmutableMap.of("user", user));
return bindToRequest(request, (Object) ImmutableMap.of("user", user));
}
/**

View File

@ -86,7 +86,7 @@ public class UpdateTenantOptions implements MapBinder {
tenant.name = name;
tenant.enabled = enabled;
return bindToRequest(request, ImmutableMap.of("tenant", tenant));
return bindToRequest(request, (Object) ImmutableMap.of("tenant", tenant));
}
/**

View File

@ -93,7 +93,7 @@ public class UpdateUserOptions implements MapBinder{
user.password = password;
user.enabled = enabled;
return bindToRequest(request, ImmutableMap.of("user", user));
return bindToRequest(request, (Object) ImmutableMap.of("user", user));
}
/**

View File

@ -43,11 +43,6 @@ public class BindSecurityGroupRuleToJsonPayload extends BindToJsonPayload implem
super(jsonBinder);
}
@Override
public <R extends HttpRequest> R bindToRequest(R request, Object toBind) {
throw new IllegalStateException("BindCredentialsToJsonPayload needs parameters");
}
@Override
public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
Builder<String, Object> payload = ImmutableMap.builder();

View File

@ -253,7 +253,7 @@ public class CreateServerOptions implements MapBinder {
server.blockDeviceMappings = blockDeviceMappings;
}
return bindToRequest(request, ImmutableMap.of("server", server));
return bindToRequest(request, (Object) ImmutableMap.of("server", server));
}
private static class NamedThingy extends ForwardingObject {