Enable some Xlint warnings

Also address a handful of warnings.
This commit is contained in:
Andrew Gaul 2013-09-03 05:54:48 -07:00
parent 3ad6b275d4
commit d8490f872d
8 changed files with 15 additions and 6 deletions

View File

@ -64,8 +64,6 @@ public class SCSIDevice extends Device {
if (getClass() != obj.getClass()) if (getClass() != obj.getClass())
return false; return false;
SCSIDevice other = (SCSIDevice) obj; SCSIDevice other = (SCSIDevice) obj;
if (bus != other.bus)
return false;
if (unit != other.unit) if (unit != other.unit)
return false; return false;
return true; return true;

View File

@ -257,7 +257,7 @@ public class AsyncJob<S> {
.error(in.getError()); .error(in.getError());
} }
public static Builder<?, Object> fromAsyncJobUntyped(AsyncJob in) { public static Builder<?, Object> fromAsyncJobUntyped(AsyncJob<?> in) {
return new ConcreteBuilder().fromAsyncJob(in); return new ConcreteBuilder().fromAsyncJob(in);
} }
} }
@ -426,7 +426,7 @@ public class AsyncJob<S> {
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this == obj) return true; if (this == obj) return true;
if (obj == null || getClass() != obj.getClass()) return false; if (obj == null || getClass() != obj.getClass()) return false;
AsyncJob that = AsyncJob.class.cast(obj); AsyncJob<?> that = AsyncJob.class.cast(obj);
return Objects.equal(this.accountId, that.accountId) return Objects.equal(this.accountId, that.accountId)
&& Objects.equal(this.cmd, that.cmd) && Objects.equal(this.cmd, that.cmd)
&& Objects.equal(this.created, that.created) && Objects.equal(this.created, that.created)

View File

@ -64,8 +64,6 @@ public class SCSIDevice extends Device {
if (getClass() != obj.getClass()) if (getClass() != obj.getClass())
return false; return false;
SCSIDevice other = (SCSIDevice) obj; SCSIDevice other = (SCSIDevice) obj;
if (bus != other.bus)
return false;
if (unit != other.unit) if (unit != other.unit)
return false; return false;
return true; return true;

View File

@ -31,6 +31,7 @@ import com.google.common.annotations.Beta;
* async interface will be removed in jclouds 1.7. * async interface will be removed in jclouds 1.7.
*/ */
@Beta @Beta
@Deprecated
public class AnonymousRestApiMetadata extends BaseRestApiMetadata { public class AnonymousRestApiMetadata extends BaseRestApiMetadata {
public static AnonymousRestApiMetadata forClientMappedToAsyncClient(Class<?> client, Class<?> asyncClient) { public static AnonymousRestApiMetadata forClientMappedToAsyncClient(Class<?> client, Class<?> asyncClient) {

View File

@ -38,6 +38,7 @@ import com.google.common.reflect.TypeToken;
* async interface will be removed in jclouds 1.7. * async interface will be removed in jclouds 1.7.
*/ */
@Beta @Beta
@Deprecated
public abstract class BaseRestApiMetadata extends BaseApiMetadata implements RestApiMetadata { public abstract class BaseRestApiMetadata extends BaseApiMetadata implements RestApiMetadata {
protected final Class<?> api; protected final Class<?> api;

View File

@ -602,6 +602,15 @@
<encoding>${project.build.sourceEncoding}</encoding> <encoding>${project.build.sourceEncoding}</encoding>
<source>${maven.compile.source}</source> <source>${maven.compile.source}</source>
<target>${maven.compile.target}</target> <target>${maven.compile.target}</target>
<showDeprecation>false</showDeprecation>
<showWarnings>true</showWarnings>
<compilerArguments>
<Xlint />
<Xlint:-deprecation />
<Xlint:-rawtypes />
<Xlint:-serial />
<Xlint:-unchecked />
</compilerArguments>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>

View File

@ -70,6 +70,7 @@ import com.google.common.util.concurrent.ListenableFuture;
*/ */
@RequestFilters(RequestAuthorizeSignature.class) @RequestFilters(RequestAuthorizeSignature.class)
@BlobScope(CONTAINER) @BlobScope(CONTAINER)
@Deprecated
public interface AWSS3AsyncClient extends S3AsyncClient { public interface AWSS3AsyncClient extends S3AsyncClient {
/** /**

View File

@ -139,6 +139,7 @@ public class UltraDNSWSErrorHandler implements HttpErrorHandler {
return exception; return exception;
if (exception.getError().getDescription().get().indexOf("Cannot find") == -1) if (exception.getError().getDescription().get().indexOf("Cannot find") == -1)
return exception; return exception;
return new ResourceNotFoundException(message, exception);
case ErrorCodes.ZONE_NOT_FOUND: case ErrorCodes.ZONE_NOT_FOUND:
case ErrorCodes.RESOURCE_RECORD_NOT_FOUND: case ErrorCodes.RESOURCE_RECORD_NOT_FOUND:
case ErrorCodes.ACCOUNT_NOT_FOUND: case ErrorCodes.ACCOUNT_NOT_FOUND: