https://bz.apache.org/bugzilla/show_bug.cgi?id=63360
--- Comment #18 from Felix Schumacher <[email protected]> --- (In reply to Philippe Mouawad from comment #14) > (In reply to Felix Schumacher from comment #13) > > @philippe Could "Bug 63144 - View listener tree take a long time to open > > response that have Huge text" r1853121 be related to the surfacing of this > > issue? > > Hello Felix, > Yes it is absolutely related. > > I'll try to have a look , but if you have an idea, I'll be happy to test if > you need me to > > Regards I don't think we can fix this easily in our code -- apart from reverting the speed improvement. The class jsyntaxpane.SyntaxView assumes in line 68 that the document it gets by calling getDocumet() is a SyntaxDocument. But in (the new 5.1.1) reality it might be a DefaultStyledDocument. That leads to the ClassCastException. I can think of one situation, where this could happen. It is when we have changed in the blank placeholder (empty instance of DefaultStyledDocument) with the filled document that was displayed. But the call to SyntaxView#drawUnselectedText would have to happen while the documents are switched. This should not happen (famous last words). I will attach a patch for jsyntaxpane, that makes it fallback to super.drawUnselectedText when it doesn't find a SyntaxDocument. I am not sure, whether it helps or it is the right thing to do. -- You are receiving this mail because: You are the assignee for the bug.
