hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1790477 - /httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java
Date Thu, 06 Apr 2017 22:42:06 GMT
Author: ggregory
Date: Thu Apr  6 22:42:05 2017
New Revision: 1790477

URL: http://svn.apache.org/viewvc?rev=1790477&view=rev
Log:
Move null check from factory method into constructor.

Modified:
    httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java?rev=1790477&r1=1790476&r2=1790477&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java
Thu Apr  6 22:42:05 2017
@@ -55,7 +55,6 @@ public class TimeValue {
     }
 
     public static TimeValue of(final long duration, final TimeUnit timeUnit) {
-        Args.notNull(timeUnit, "timeUnit");
         return new TimeValue(duration, timeUnit);
     }
 
@@ -86,7 +85,7 @@ public class TimeValue {
     TimeValue(final long duration, final TimeUnit timeUnit) {
         super();
         this.duration = duration;
-        this.timeUnit = timeUnit;
+        this.timeUnit = Args.notNull(timeUnit, "timeUnit");
     }
 
     public long convert(final TimeUnit sourceUnit) {



Mime
View raw message