[jira] [Work logged] (IO-669) fix code smells; fix typos
[ https://issues.apache.org/jira/browse/IO-669?focusedWorklogId=439224=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-439224 ] ASF GitHub Bot logged work on IO-669: - Author: ASF GitHub Bot Created on: 31/May/20 12:11 Start Date: 31/May/20 12:11 Worklog Time Spent: 10m Work Description: garydgregory merged pull request #115: URL: https://github.com/apache/commons-io/pull/115 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: 439224) Time Spent: 50m (was: 40m) > fix code smells; fix typos > --- > > Key: IO-669 > URL: https://issues.apache.org/jira/browse/IO-669 > Project: Commons IO > Issue Type: Improvement >Reporter: JIN XU >Priority: Minor > Time Spent: 50m > Remaining Estimate: 0h > > [https://github.com/apache/commons-io/pull/115] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (IO-669) fix code smells; fix typos
[ https://issues.apache.org/jira/browse/IO-669?focusedWorklogId=439110=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-439110 ] ASF GitHub Bot logged work on IO-669: - Author: ASF GitHub Bot Created on: 30/May/20 17:14 Start Date: 30/May/20 17:14 Worklog Time Spent: 10m Work Description: coveralls edited a comment on pull request #115: URL: https://github.com/apache/commons-io/pull/115#issuecomment-633306871 [![Coverage Status](https://coveralls.io/builds/31134674/badge)](https://coveralls.io/builds/31134674) Coverage remained the same at 89.783% when pulling **77f23ed17645a0af2ca2e423ad28e7da2078e3c3 on XenoAmess:fix_code_smells** into **661d47c2d347a0b38ceba80e43020ee6a92d3177 on apache:master**. 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: 439110) Time Spent: 40m (was: 0.5h) > fix code smells; fix typos > --- > > Key: IO-669 > URL: https://issues.apache.org/jira/browse/IO-669 > Project: Commons IO > Issue Type: Improvement >Reporter: JIN XU >Priority: Minor > Time Spent: 40m > Remaining Estimate: 0h > > [https://github.com/apache/commons-io/pull/115] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (IO-669) fix code smells; fix typos
[ https://issues.apache.org/jira/browse/IO-669?focusedWorklogId=439107=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-439107 ] ASF GitHub Bot logged work on IO-669: - Author: ASF GitHub Bot Created on: 30/May/20 16:59 Start Date: 30/May/20 16:59 Worklog Time Spent: 10m Work Description: XenoAmess commented on a change in pull request #115: URL: https://github.com/apache/commons-io/pull/115#discussion_r432870107 ## File path: src/main/java/org/apache/commons/io/file/Counters.java ## @@ -92,8 +92,8 @@ public int hashCode() { @Override public String toString() { -return String.format("%,d files, %,d directories, %,d bytes", Long.valueOf(fileCounter.get()), -Long.valueOf(directoryCounter.get()), Long.valueOf(byteCounter.get())); +return String.format("%,d files, %,d directories, %,d bytes", fileCounter.get(), +directoryCounter.get(), byteCounter.get()); Review comment: OK, will not happen next time :-) ## File path: src/main/java/org/apache/commons/io/file/Counters.java ## @@ -135,7 +135,7 @@ public BigInteger getBigInteger() { @Override public Long getLong() { -return Long.valueOf(value.longValueExact()); +return value.longValueExact(); Review comment: done. ## File path: src/main/java/org/apache/commons/io/file/Counters.java ## @@ -245,7 +245,7 @@ public BigInteger getBigInteger() { @Override public Long getLong() { -return Long.valueOf(value); +return value; Review comment: done. 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: 439107) Time Spent: 0.5h (was: 20m) > fix code smells; fix typos > --- > > Key: IO-669 > URL: https://issues.apache.org/jira/browse/IO-669 > Project: Commons IO > Issue Type: Improvement >Reporter: JIN XU >Priority: Minor > Time Spent: 0.5h > Remaining Estimate: 0h > > [https://github.com/apache/commons-io/pull/115] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (IO-669) fix code smells; fix typos
[ https://issues.apache.org/jira/browse/IO-669?focusedWorklogId=439104=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-439104 ] ASF GitHub Bot logged work on IO-669: - Author: ASF GitHub Bot Created on: 30/May/20 16:57 Start Date: 30/May/20 16:57 Worklog Time Spent: 10m Work Description: XenoAmess commented on a change in pull request #115: URL: https://github.com/apache/commons-io/pull/115#discussion_r432869943 ## File path: src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java ## @@ -1406,7 +1406,7 @@ public void testFilterListNullParameters() { final IOFileFilter filter = FileFilterUtils.trueFileFilter(); try { -FileFilterUtils.filterList(filter, Arrays.asList((File) null)); +FileFilterUtils.filterList(filter, Collections.singletonList((File) null)); Review comment: @garydgregory it is only used as a Iterable there thus I think it has no actual difference IMO, exluding running speed. 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: 439104) Time Spent: 20m (was: 10m) > fix code smells; fix typos > --- > > Key: IO-669 > URL: https://issues.apache.org/jira/browse/IO-669 > Project: Commons IO > Issue Type: Improvement >Reporter: JIN XU >Priority: Minor > Time Spent: 20m > Remaining Estimate: 0h > > [https://github.com/apache/commons-io/pull/115] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (IO-669) fix code smells; fix typos
[ https://issues.apache.org/jira/browse/IO-669?focusedWorklogId=439073=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-439073 ] ASF GitHub Bot logged work on IO-669: - Author: ASF GitHub Bot Created on: 30/May/20 14:04 Start Date: 30/May/20 14:04 Worklog Time Spent: 10m Work Description: garydgregory commented on a change in pull request #115: URL: https://github.com/apache/commons-io/pull/115#discussion_r432843971 ## File path: src/main/java/org/apache/commons/io/file/Counters.java ## @@ -245,7 +245,7 @@ public BigInteger getBigInteger() { @Override public Long getLong() { -return Long.valueOf(value); +return value; Review comment: See other comment. ## File path: src/main/java/org/apache/commons/io/file/Counters.java ## @@ -92,8 +92,8 @@ public int hashCode() { @Override public String toString() { -return String.format("%,d files, %,d directories, %,d bytes", Long.valueOf(fileCounter.get()), -Long.valueOf(directoryCounter.get()), Long.valueOf(byteCounter.get())); +return String.format("%,d files, %,d directories, %,d bytes", fileCounter.get(), +directoryCounter.get(), byteCounter.get()); Review comment: Same comment as in your other PR. Let's leave boxing and unboxing as obvious since we are in a low level library and I prefer to see where this happens so we can think about consequences of creating objects. ## File path: src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java ## @@ -1406,7 +1406,7 @@ public void testFilterListNullParameters() { final IOFileFilter filter = FileFilterUtils.trueFileFilter(); try { -FileFilterUtils.filterList(filter, Arrays.asList((File) null)); +FileFilterUtils.filterList(filter, Collections.singletonList((File) null)); Review comment: It is worth testing both kinds? ## File path: src/main/java/org/apache/commons/io/file/Counters.java ## @@ -135,7 +135,7 @@ public BigInteger getBigInteger() { @Override public Long getLong() { -return Long.valueOf(value.longValueExact()); +return value.longValueExact(); Review comment: See other comment. 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: 439073) Remaining Estimate: 0h Time Spent: 10m > fix code smells; fix typos > --- > > Key: IO-669 > URL: https://issues.apache.org/jira/browse/IO-669 > Project: Commons IO > Issue Type: Improvement >Reporter: JIN XU >Priority: Minor > Time Spent: 10m > Remaining Estimate: 0h > > [https://github.com/apache/commons-io/pull/115] -- This message was sent by Atlassian Jira (v8.3.4#803005)