Prefer Math.max over Ints.max to avoid varargs

This commit is contained in:
Andrew Gaul 2013-12-12 17:53:34 -08:00
parent 91906b90be
commit 8bf23069d9
1 changed files with 3 additions and 5 deletions

View File

@ -16,8 +16,6 @@
*/
package org.jclouds.rest;
import com.google.common.primitives.Ints;
/**
* This exception is raised when an http endpoint returns with a response
* telling the caller to make the same request after a certain period of time.
@ -44,7 +42,7 @@ public class RetryAfterException extends RuntimeException {
*/
public RetryAfterException(String message, int seconds) {
super(message);
this.seconds = Ints.max(seconds, 0);
this.seconds = Math.max(seconds, 0);
}
/**
@ -56,7 +54,7 @@ public class RetryAfterException extends RuntimeException {
* retry after delta. Negative values are converted to zero
*/
public RetryAfterException(Throwable cause, int seconds) {
super(defaultMessage(seconds = Ints.max(seconds, 0)), cause);
super(defaultMessage(seconds = Math.max(seconds, 0)), cause);
this.seconds = seconds;
}
@ -83,7 +81,7 @@ public class RetryAfterException extends RuntimeException {
*/
public RetryAfterException(String message, Throwable cause, int seconds) {
super(message, cause);
this.seconds = Ints.max(seconds, 0);
this.seconds = Math.max(seconds, 0);
}
/**