You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/08/16 21:07:08 UTC

[GitHub] [hadoop] smengcl commented on a change in pull request #1305: HDDS-1938. Change omPort parameter type from String to int in BasicOzoneFileSystem#createAdapter

smengcl commented on a change in pull request #1305: HDDS-1938. Change omPort parameter type from String to int in BasicOzoneFileSystem#createAdapter
URL: https://github.com/apache/hadoop/pull/1305#discussion_r314890276
 
 

 ##########
 File path: hadoop-ozone/ozonefs/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneFileSystem.java
 ##########
 @@ -113,7 +113,7 @@ public void initialize(URI name, Configuration conf) throws IOException {
     String remaining = matcher.groupCount() == 3 ? matcher.group(3) : null;
 
     String omHost = null;
-    String omPort = String.valueOf(-1);
+    int omPort = -1;
 
 Review comment:
   I think we should initialize it. Because In a corner case where `remaining` is empty, omPort would be uninitialized when reaching line 154 (createAdapter()). I think that might be an issue.

----------------------------------------------------------------
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: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org