[ https://issues.apache.org/jira/browse/HDDS-1938?focusedWorklogId=296574&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-296574 ]
ASF GitHub Bot logged work on HDDS-1938: ---------------------------------------- Author: ASF GitHub Bot Created on: 16/Aug/19 21:07 Start Date: 16/Aug/19 21:07 Worklog Time Spent: 10m Work Description: smengcl commented on 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 become uninitialized when reaching L154 `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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 296574) Time Spent: 1h 20m (was: 1h 10m) > Change omPort parameter type from String to int in > BasicOzoneFileSystem#createAdapter > ------------------------------------------------------------------------------------- > > Key: HDDS-1938 > URL: https://issues.apache.org/jira/browse/HDDS-1938 > Project: Hadoop Distributed Data Store > Issue Type: Improvement > Components: Ozone Filesystem > Reporter: Siyao Meng > Assignee: Siyao Meng > Priority: Major > Labels: pull-request-available > Attachments: HDDS-1938.001.patch > > Time Spent: 1h 20m > Remaining Estimate: 0h > > The diff will be based on HDDS-1891. > Goal: > 1. Change omPort type to int because it is eventually used as int anyway > 2. Refactor the parser code in BasicOzoneFileSystem#initialize > Will post a PR after HDDS-1891 is merged. -- This message was sent by Atlassian JIRA (v7.6.14#76016) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org