mirror of https://github.com/apache/jclouds.git
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:
parent
7f446a638d
commit
d7d28fe7d7
|
@ -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)) {
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue