Skip to content

code optimization#15

Closed
ghost wants to merge 1 commit into
trunkfrom
unknown repository
Closed

code optimization#15
ghost wants to merge 1 commit into
trunkfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jul 24, 2016

Copy link
Copy Markdown

Signed-off-by: happyelf 1226085152@qq.com

Signed-off-by: happyelf <1226085152@qq.com>
@garydgregory

Copy link
Copy Markdown
Member

Hello,

Thank you for the PR. It looks like this PR mixes a few different kinds of changes.

What does this optimize:

diff --git a/src/main/java/org/apache/commons/io/filefilter/DelegateFileFilter.java b/src/main/java/org/apache/commons/io/filefilter/DelegateFileFilter.java
index a4fdc74..b5163da 100644
--- a/src/main/java/org/apache/commons/io/filefilter/DelegateFileFilter.java
+++ b/src/main/java/org/apache/commons/io/filefilter/DelegateFileFilter.java
@@ -74,9 +74,8 @@ public DelegateFileFilter(final FileFilter filter) {
public boolean accept(final File file) {
if (fileFilter != null) {
return fileFilter.accept(file);

  •    } else {
    
  •        return super.accept(file);
     }
    
  •    return super.accept(file);
    
    }

?

I usually make changes like the above as well but I would not consider them "optimizations". This kind of change (to me) makes the code more readable.

Perhaps you can explain what you mean by optimization? I usually think of performance, speed or memory.

@asfgit asfgit closed this in 933796e Nov 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants