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())
return false;
SCSIDevice other = (SCSIDevice) obj;
if (bus != other.bus)
return false;
if (unit != other.unit)
return false;
return true;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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