Bug 55064 - Useless processing in ReportTreeListener.isValidDragAction()
Useless processing in ReportTreeListener.isValidDragAction()
Product: JMeter
Classification: Unclassified
Component: Main
All All
: P2 normal (vote)
: ---
Assigned To: JMeter issues mailing list
: PatchAvailable
Depends on:
  Show dependency tree
Reported: 2013-06-05 17:57 UTC by Adrian Nistor
Modified: 2013-07-11 20:21 UTC (History)
2 users (show)

patch (551 bytes, patch)
2013-06-05 17:57 UTC, Adrian Nistor
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Nistor 2013-06-05 17:57:32 UTC
Created attachment 30399 [details]

The problem appears in version 2.9 and in revision 1489981.  I
attached a one-line patch that fixes it.  This problem and the patch
are similar to the previously fixed Bug 55056.

In method "ReportTreeListener.isValidDragAction", the loop over "path"
should break immediately after "isValid" is set to "false".  All the
iterations after "isValid" is set to "false" do not perform any useful
work, at best they just set "isValid" again to "false".

Method "include" in class "ClassFilter" has a similar loop (over
"pkgs"), and this loop breaks immediately after "inc" is set to
"true", just like in the proposed patch.  Other methods (e.g.,
"Copy.keepOnlyAncestors", "JMeterThread.getSampleListeners",
"LogFilter.incFile") also have similar loops with similar breaks, just
like in the proposed patch.
Comment 1 Philippe Mouawad 2013-06-05 19:05:34 UTC
Thanks for patch, applied.

Date: Wed Jun  5 19:04:42 2013
New Revision: 1490008

URL: http://svn.apache.org/r1490008
Bug 55064 - Useless processing in ReportTreeListener.isValidDragAction()
Bugzilla Id: 55064