hadoop-ozone-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dine...@apache.org
Subject [hadoop-ozone] branch master updated: HDDS-2532. Sonar : fix issues in OzoneQuota (#311)
Date Tue, 10 Dec 2019 14:45:12 GMT
This is an automated email from the ASF dual-hosted git repository.

dineshc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 51c5e42  HDDS-2532. Sonar : fix issues in OzoneQuota (#311)
51c5e42 is described below

commit 51c5e4228305f6abd78a598c56f688ab2f8e1c80
Author: Yi Sheng <lianp964@gmail.com>
AuthorDate: Tue Dec 10 22:45:04 2019 +0800

    HDDS-2532. Sonar : fix issues in OzoneQuota (#311)
---
 .../main/java/org/apache/hadoop/hdds/client/OzoneQuota.java  | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/OzoneQuota.java
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/OzoneQuota.java
index 59708a9..2c9473c 100644
--- a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/OzoneQuota.java
+++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/OzoneQuota.java
@@ -92,11 +92,8 @@ public class OzoneQuota {
    * @param quotaString Quota String
    *
    * @return OzoneQuota object
-   *
-   * @throws IllegalArgumentException
    */
-  public static OzoneQuota parseQuota(String quotaString)
-      throws IllegalArgumentException {
+  public static OzoneQuota parseQuota(String quotaString) {
 
     if ((quotaString == null) || (quotaString.isEmpty())) {
       throw new IllegalArgumentException(
@@ -107,7 +104,7 @@ public class OzoneQuota {
     String size = "";
     int nSize;
     Units currUnit = Units.MB;
-    Boolean found = false;
+    boolean found = false;
     if (uppercase.endsWith(OZONE_QUOTA_MB)) {
       size = uppercase
           .substring(0, uppercase.length() - OZONE_QUOTA_MB.length());
@@ -137,9 +134,8 @@ public class OzoneQuota {
     }
 
     if (!found) {
-      throw new IllegalArgumentException(
-          "Quota unit not recognized. Supported values are BYTES, MB, GB and " +
-              "TB.");
+      throw new IllegalArgumentException("Quota unit not recognized. " +
+          "Supported values are BYTES, MB, GB and TB.");
     }
 
     nSize = Integer.parseInt(size);


---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-commits-help@hadoop.apache.org


Mime
View raw message