hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject [43/50] [abbrv] httpcomponents-core git commit: Checkstyle fixes.
Date Tue, 09 May 2017 19:58:35 GMT
Checkstyle fixes.

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk@1793427 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/981ad57f
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/981ad57f
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/981ad57f

Branch: refs/heads/trunk
Commit: 981ad57f041d25195b79982c3bcc507a8efed839
Parents: aa9928d
Author: Gary D. Gregory <ggregory@apache.org>
Authored: Tue May 2 01:08:31 2017 +0000
Committer: Gary D. Gregory <ggregory@apache.org>
Committed: Tue May 2 01:08:31 2017 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/hc/core5/util/TimeValue.java   | 9 +++++----
 .../src/main/java/org/apache/hc/core5/util/Timeout.java     | 8 +++-----
 2 files changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/981ad57f/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java b/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java
index 877a92b..d81253a 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java
@@ -170,17 +170,18 @@ public class TimeValue {
 
     /**
      * Parses a TimeValue in the format {@code <Integer><SPACE><TimeUnit>},
for example {@code "1,200 MILLISECONDS"}
-     * 
+     *
      * @param value
      *            the TimeValue to parse
      * @return a new TimeValue
      * @throws ParseException
      *             if the number cannot be parsed
      */
-    public static TimeValue parse(String value) throws ParseException {
-        String split[] = value.split("\\s+");
+    public static TimeValue parse(final String value) throws ParseException {
+        final String split[] = value.split("\\s+");
         if (split.length < 2) {
-            throw new IllegalArgumentException(String.format("Expected format for <Integer><SPACE><TimeUnit>:
", value));
+            throw new IllegalArgumentException(
+                    String.format("Expected format for <Integer><SPACE><TimeUnit>:
", value));
         }
         return TimeValue.of(NumberFormat.getInstance().parse(split[0]).longValue(),
                 TimeUnit.valueOf(split[1].trim().toUpperCase(Locale.ROOT)));

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/981ad57f/httpcore5/src/main/java/org/apache/hc/core5/util/Timeout.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/util/Timeout.java b/httpcore5/src/main/java/org/apache/hc/core5/util/Timeout.java
index 5b1f3b8..04b40e0 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/util/Timeout.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/util/Timeout.java
@@ -27,9 +27,7 @@
 
 package org.apache.hc.core5.util;
 
-import java.text.NumberFormat;
 import java.text.ParseException;
-import java.util.Locale;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.hc.core5.annotation.Contract;
@@ -152,17 +150,17 @@ public class Timeout extends TimeValue {
 
     /**
      * Parses a Timeout in the format {@code <Integer><SPACE><TimeUnit>},
for example {@code "1,200 MILLISECONDS"}
-     * 
+     *
      * @param value
      *            the TimeValue to parse
      * @return a new TimeValue
      * @throws ParseException
      *             if the number cannot be parsed
      */
-    public static Timeout parse(String value) throws ParseException {
+    public static Timeout parse(final String value) throws ParseException {
         return TimeValue.parse(value).toTimeout();
     }
-    
+
     private static long validateDuration(final long duration) {
         if (duration < INT_UNDEFINED) {
             throw new IllegalArgumentException("Duration may not be less than " + INT_UNDEFINED);


Mime
View raw message