RequestCtx.encode not respecting environment tag
Brought to you by:
farrukh_najmi,
sethp
Suppose the set of environment attributes passed to the RequestCtx are empty, the encode method should print an empty <Environment/> tag.
// finally the environment, if there are any attrs
if (environment.size() != 0) {
out.println(indent + "<Environment>");
encodeAttributes(environment, out, indenter);
out.println(indent + "</Environment>");
}
==========
out.println(indent + "<Environment>");
if (environment.size() != 0) {
encodeAttributes(environment, out, indenter);
}
out.println(indent + "</Environment>");
The reason is that the schema mandates the Environment tag.