From 8bf23069d925915f905c7be05082d15f969b0f7b Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Thu, 12 Dec 2013 17:53:34 -0800 Subject: [PATCH] Prefer Math.max over Ints.max to avoid varargs --- .../main/java/org/jclouds/rest/RetryAfterException.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/org/jclouds/rest/RetryAfterException.java b/core/src/main/java/org/jclouds/rest/RetryAfterException.java index 197770dc4a..d44e9e5669 100644 --- a/core/src/main/java/org/jclouds/rest/RetryAfterException.java +++ b/core/src/main/java/org/jclouds/rest/RetryAfterException.java @@ -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); } /**