https://issues.apache.org/bugzilla/show_bug.cgi?id=55108
Bug ID: 55108
Summary: Wasted work in "AbstractReplicatedMap.excludeFromSet"
Product: Tomcat 7
Version: 7.0.41
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
Created attachment 30448
--> https://issues.apache.org/bugzilla/attachment.cgi?id=30448&action=edit
patch
The problem appears in version 7.0.41 and in revision 1493861. I
attached a one-line patch that fixes it.
In method "AbstractReplicatedMap.excludeFromSet", the loop over "mbrs"
should break immediately after "include" is set to "false". All the
iterations after "include" is set to "false" do not perform any useful
work, at best they just set "include" again to "false".
Method "inSet" in the same class "AbstractReplicatedMap" (right above
the definition of "excludeFromSet") has a similar loop (over "set"),
and this loop breaks immediately after "result" is set to "true", just
like in the proposed patch. Other methods (e.g.,
"MapperListener.findDefaultHost", "CollectVisitor.checkSeen",
"JspDocumentParser.processChars", "ParameterParser.isOneOf") also have
similar loops with similar breaks, just like in the proposed patch.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]