ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 54296] New: wasted work in "FTPTaskMirrorImpl.FTPDirectoryScanner.checkRemoteSensitivity"
Date Fri, 14 Dec 2012 15:05:25 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=54296

            Bug ID: 54296
           Summary: wasted work in
                    "FTPTaskMirrorImpl.FTPDirectoryScanner.checkRemoteSens
                    itivity"
           Product: Ant
           Version: 1.8.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
          Assignee: notifications@ant.apache.org
          Reporter: nistor1@illinois.edu
    Classification: Unclassified

Created attachment 29755
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29755&action=edit
patch

The problem appears in version 1.8.4 and in revision 1421898.  I
attached a one-line patch that fixes it.

In method "FTPTaskMirrorImpl.FTPDirectoryScanner.checkRemoteSensitivity", 
the innermost loop over "array" should call "break" immediately after
"candidateFound" is set to "false".  All the iterations after
"candidateFound" is set to "false" do not perform any useful work, at
best they just set "candidateFound" again to "false".

There are other similar loops in Ant, and these loops call "break"
immediately after the boolean is set, just like in the proposed patch
(e.g., loops in methods "FTP.findFileName", "SelectorUtils.match"
"ChainReaderHelper.expandReader", "AntClassLoader.isParentFirst",
"WebLogicHotDeploymentTool.isActionValid", "P4Resolve.setResolvemode",
FTPTaskMirrorImpl.findFileName, etc).

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message