*/
public BodyContentImpl(JspWriter enclosingWriter) {
super(enclosingWriter);
- bufferSize = Constants.DEFAULT_TAG_BUFFER_SIZE;
- cb = new char[bufferSize];
+ cb = new char[Constants.DEFAULT_TAG_BUFFER_SIZE];
+ bufferSize = cb.length;
nextChar = 0;
closed = false;
}
} else {
nextChar = 0;
if (LIMIT_BUFFER && (cb.length > Constants.DEFAULT_TAG_BUFFER_SIZE)) {
- bufferSize = Constants.DEFAULT_TAG_BUFFER_SIZE;
- cb = new char[bufferSize];
+ cb = new char[Constants.DEFAULT_TAG_BUFFER_SIZE];
+ bufferSize = cb.length;
}
}
}
len = cb.length;
}
- bufferSize = cb.length + len;
- char[] tmp = new char[bufferSize];
-
+ char[] tmp = new char[cb.length + len];
System.arraycopy(cb, 0, tmp, 0, cb.length);
cb = tmp;
- tmp = null;
-
+ bufferSize = cb.length;
}
Use a single TLD location cache for a web application rather than one
per JSP compilation to speed up JSP compilation. (markt)
</update>
+ <add>
+ <bug>51124</bug>: Refactor BodyContentImpl to assist in determining the
+ root cause of this bug. Based on a patch by Ramiro. (markt)
+ </add>
</changelog>
</subsection>
<subsection name="Web applications">