Remove @Nullable from methods returning primitives

Found via error-prone.
This commit is contained in:
Andrew Gaul 2015-12-12 08:07:34 +08:00
parent 75e2c6999c
commit 06e379d7a5
6 changed files with 4 additions and 13 deletions

View File

@ -16,8 +16,6 @@
*/
package org.jclouds.cloudwatch.domain;
import org.jclouds.javax.annotation.Nullable;
/**
* @see <a href="http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/API_StatisticSet.html" />
*/
@ -38,7 +36,6 @@ public class StatisticValues {
/**
* return the maximum value of the sample set
*/
@Nullable
public double getMaximum() {
return maximum;
}
@ -46,7 +43,6 @@ public class StatisticValues {
/**
* return the minimum value of the sample set
*/
@Nullable
public double getMinimum() {
return minimum;
}
@ -54,7 +50,6 @@ public class StatisticValues {
/**
* return the number of samples used for the statistic set
*/
@Nullable
public double getSampleCount() {
return sampleCount;
}
@ -62,7 +57,6 @@ public class StatisticValues {
/**
* return the sum of values for the sample set
*/
@Nullable
public double getSum() {
return sum;
}

View File

@ -749,6 +749,7 @@
<compilerArg>-Xep:GuiceAssistedInjectScoping:OFF</compilerArg>
<compilerArg>-Xep:LongLiteralLowerCaseSuffix:OFF</compilerArg>
<compilerArg>-Xep:NonAtomicVolatileUpdate:OFF</compilerArg>
<compilerArg>-Xep:NullablePrimitive:ERROR</compilerArg>
<compilerArg>-Xep:StringEquality:ERROR</compilerArg>
<compilerArg>-Xep:TypeParameterUnusedInFormals:OFF</compilerArg>
</compilerArgs>

View File

@ -72,8 +72,8 @@ public abstract class BackendService {
@Nullable public abstract String description();
@Nullable public abstract List<Backend> backends();
@Nullable public abstract List<URI> healthChecks();
@Nullable public abstract int timeoutSec();
@Nullable public abstract int port();
public abstract int timeoutSec();
public abstract int port();
@Nullable public abstract String protocol();
@Nullable public abstract String fingerprint();
@Nullable public abstract String portName();

View File

@ -46,7 +46,7 @@ public abstract class Instance {
}
/** A zero-based index to assign to this disk, where 0 is reserved for the boot disk. */
@Nullable public abstract int index();
public abstract int index();
public abstract Type type();

View File

@ -238,7 +238,6 @@ public class Address {
/**
* @return The id of the account.
*/
@Nullable
public int getAccountId() {
return accountId;
}
@ -270,7 +269,6 @@ public class Address {
/**
* @return The name of the contact.
*/
@Nullable
public int isActive() {
return isActive;
}
@ -278,7 +276,6 @@ public class Address {
/**
* @return The id of the location.
*/
@Nullable
public int getLocationId() {
return locationId;
}

View File

@ -789,7 +789,6 @@ public class VirtualGuest {
return this.powerState;
}
@Nullable
public int getActiveTransactionCount() {
return activeTransactionCount;
}