IPP ClassCast. Happens quite often.

ERROR - com.intellij.ide.IdeEventQueue - IntelliJ IDEA (Aurora)
Bui
ld #__BUILD_NUMBER__
ERROR - com.intellij.ide.IdeEventQueue - Internal version.
Compiled 0
1 August 2003 18:17
ERROR - com.intellij.ide.IdeEventQueue - JDK: 1.4.2-beta
ERROR - com.intellij.ide.IdeEventQueue - VM: Java HotSpot(TM)
Client
VM
ERROR - com.intellij.ide.IdeEventQueue - Vendor: Sun Microsystems
Inc
.
ERROR - com.intellij.ide.IdeEventQueue - OS: Windows XP
ERROR - com.intellij.ide.IdeEventQueue - Last Action: EditorUp
ERROR - com.intellij.ide.IdeEventQueue -
java.lang.ClassCastException
at
com.siyeh.ipp.conditional.ConditionalDeclarationPredicate.satisfiedBy
(ConditionalDeclarationPredicate.java:20)
at com.siyeh.ipp.Intention.findMatchingElement(Intention.java:112)
at com.siyeh.ipp.Intention.isAvailable(Intention.java:126)
at
com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.showIntention
Actions(ShowIntentionsPass.java:147)
at
com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.setInformatio
nToEditor(ShowIntentionsPass.java:115)
at
com.intellij.codeInsight.daemon.impl.UpdateThread$3.run(UpdateThread.
java:155)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at
com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.jav
a:249)
at
com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:242)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:201)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:151)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)

at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

--

Best regards,
Maxim Shafirov
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"




4 comments
Comment actions Permalink

Wild. I can't reproduce it, but have put a gaurd in to prevent it in the next version anyway. Out of curiousity, what sort of things can be returned from PsiDeclarationStatement.getDeclaredElements? I had assumed only PsiVariables, but evidently was mistaken.

0
Comment actions Permalink

OT but related : doesn't it just bug you to bits that the exception message
for ClassCastException doesn't tell you the class of the object you tried to
cast anymore? Anyone know why that disappeared?

Dave Griffith wrote:

Wild. I can't reproduce it, but have put a gaurd in to prevent it in
the next version anyway. Out of curiousity, what sort of things can
be returned from PsiDeclarationStatement.getDeclaredElements? I had
assumed only PsiVariables, but evidently was mistaken.



0
Comment actions Permalink

I noticed it vanished with Sun JDK1.4, and yes, it was really annoying. Presumably it dropped off when they were redoing the Exception class stuff (stack frames, chained exceptions).

0
Comment actions Permalink

On a related note, would it be nice if on stacktraces we would get not only the line number but the column number/symbol the exception was thrown from.
I know it is smelly to chain operations but we have all to deal with legacy, badly factored app and in these cases I wished I could get that info (sigh... ;-(

Jacques

0

Please sign in to leave a comment.