[
https://issues.apache.org/jira/browse/IO-669?focusedWorklogId=439073&page=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:
[email protected]
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)