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 <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]