MCPcopy Index your code
hub / github.com/apache/tomcat / parseOptionalBody

Method parseOptionalBody

java/org/apache/jasper/compiler/Parser.java:921–940  ·  view source on GitHub ↗
(Node parent, String tag, String bodyType)

Source from the content-addressed store, hash-verified

919 *
920 */
921 private void parseOptionalBody(Node parent, String tag, String bodyType) throws JasperException {
922 if (reader.matches("/>")) {
923 // EmptyBody
924 return;
925 }
926
927 if (!reader.matches(">")) {
928 err.jspError(reader.mark(), "jsp.error.unterminated", "<" + tag);
929 }
930
931 if (reader.matchesETag(tag)) {
932 // EmptyBody
933 return;
934 }
935
936 if (!parseJspAttributeAndBody(parent, tag, bodyType)) {
937 // Must be ( '>' # Body ETag )
938 parseBody(parent, tag, bodyType);
939 }
940 }
941
942 /**
943 * Attempts to parse 'JspAttributeAndBody' production. Returns true if it matched, or false if not. Assumes

Callers 7

parseIncludeMethod · 0.95
parseForwardMethod · 0.95
parseElementMethod · 0.95
parseGetPropertyMethod · 0.95
parseSetPropertyMethod · 0.95
parseUseBeanMethod · 0.95
parseCustomTagMethod · 0.95

Calls 6

parseBodyMethod · 0.95
matchesETagMethod · 0.80
matchesMethod · 0.65
jspErrorMethod · 0.65
markMethod · 0.45

Tested by

no test coverage detected