https://issues.apache.org/bugzilla/show_bug.cgi?id=55073

            Bug ID: 55073
           Summary: wasted work in ValidateVisitor.isExpression()
           Product: Tomcat 7
           Version: 7.0.40
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
          Assignee: dev@tomcat.apache.org
          Reporter: nist...@illinois.edu

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

The problem appears in version 7.0.40 and in revision 1490425.  I
attached a two-line patch that fixes it.

In method "ValidateVisitor.isExpression", the loop over "nodes" should
break immediately after "elExpression" is set to "true".  All the
iterations after "elExpression" is set to "true" do not perform any
useful work, at best they just set "elExpression" again to "true".

Method "startInternal" in class "StandardHost" has a similar loop
(over "valves"), and this loop breaks immediately after "found" 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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to