You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2019/12/09 05:08:06 UTC

[GitHub] [hadoop-ozone] dineshchitlangia commented on a change in pull request #311: HDDS-2532. Sonar : fix issues in OzoneQuota

dineshchitlangia commented on a change in pull request #311: HDDS-2532. Sonar : fix issues in OzoneQuota
URL: https://github.com/apache/hadoop-ozone/pull/311#discussion_r355264836
 
 

 ##########
 File path: hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/OzoneQuota.java
 ##########
 @@ -137,9 +134,10 @@ public static OzoneQuota parseQuota(String quotaString)
     }
 
     if (!found) {
-      throw new IllegalArgumentException(
-          "Quota unit not recognized. Supported values are BYTES, MB, GB and " +
-              "TB.");
+      String exceptionInfo =
+          "Quota unit not recognized. " +
+          "Supported values are BYTES, MB, GB and TB.";
+      throw new IllegalArgumentException(exceptionInfo);
 
 Review comment:
   Let us avoid creating the variable `exceptionInfo` as it is not used after the next line.
   We could still beautify the current line as:
   ``` suggestion
         throw new IllegalArgumentException("Quota unit not recognized." +
                "Supported values are BYTES, MB, GB and TB.");
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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