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

Method parseEmptyBody

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

Source from the content-addressed store, hash-verified

867 * EmptyBody ::= '/>' | ( '>' ETag ) | ( '>' S? '<jsp:attribute' NamedAttributes ETag )
868 */
869 private void parseEmptyBody(Node parent, String tag) throws JasperException {
870 if (reader.matches("/>")) {
871 // Done
872 } else if (reader.matches(">")) {
873 if (reader.matchesETag(tag)) {
874 // Done
875 } else if (reader.matchesOptionalSpacesFollowedBy("<jsp:attribute")) {
876 // Parse the one or more named attribute nodes
877 parseNamedAttributes(parent);
878 if (!reader.matchesETag(tag)) {
879 // Body not allowed
880 err.jspError(reader.mark(), "jsp.error.jspbody.emptybody.only", "&lt;" + tag);
881 }
882 } else {
883 err.jspError(reader.mark(), "jsp.error.jspbody.emptybody.only", "&lt;" + tag);
884 }
885 } else {
886 err.jspError(reader.mark(), "jsp.error.unterminated", "&lt;" + tag);
887 }
888 }
889
890 /*
891 * For UseBean: StdActionContent ::= Attributes OptionalBody

Callers 3

parseParamMethod · 0.95
parseInvokeMethod · 0.95
parseDoBodyMethod · 0.95

Calls 6

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

Tested by

no test coverage detected