Consider the following:
void meth() {
org.xml.sax.helpers.XMLReaderFactory.createXMLReader().with {
contentHandler = new org.xml.sax.helpers.DefaultHandler() {
private Stack<StringBuilder> chars = []
@Override
void characters(char[] text, int offset, int length)
{
if (chars) chars.peek().append(text, offset, length)
}
}
}
}
The variable expressions "chars" within the "characters" method are showing as unknown (underlined).
Consider the following:
The variable expressions "chars" within the "characters" method are showing as unknown (underlined).