IPP Flip equals bug

Hi all,

I ran into this bug. If there's already a post for this bug, my apologies:

Intention Power Pack version 0.9 on Palada 2013:

Let's say you have the following code:
if ( someString.equals("whatImLookingFor") ) {
}

IPP will offer to flip the equals to:
if ( "whatImLookingFor".equals( someString ) ) {
}

Now say that you want to replace the String literal by a final static String:

public final static String SEARCH_STRING = "whatImLookingFor";

if ( SEARCH_STRING.equals( someString ) ) {
}

Now delete a letter of SEARCH_STRING:

if ( SARCH_STRING.equals( someString ) ) {
}

IPP will fail to resolve the element, resulting in the stack trace below.

Regards,

Raymond Brandon

Error message: Assertion failed
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:60)
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:68)
at com.intellij.psi.util.TypeConversionUtil.isAssignable(TypeConversionUtil.java:423)
at com.intellij.psi.PsiType.isAssignableFrom(PsiType.java:30)
at com.siyeh.ipp.commutative.CommutativeMethodCallPredicate.satisfiedBy(CommutativeMethodCallPredicate.java:70)
at com.siyeh.ipp.Intention.findMatchingElement(Intention.java:125)
at com.siyeh.ipp.MutablyNamedIntention.isAvailable(MutablyNamedIntention.java:26)
at com.intellij.codeInsight.d.a.m.d(m.java:100)
at com.intellij.codeInsight.d.a.m.c(m.java:153)
at com.intellij.codeInsight.d.a.e$3.run(e$3.java:3)
at com.intellij.openapi.l.a.d$b_.run(d$b_.java:5)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at com.intellij.ide.r.b(r.java:43)
at com.intellij.ide.r.a(r.java:30)
at com.intellij.ide.r.dispatchEvent(r.java:99)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.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)

4 comments
Comment actions Permalink

Looks to be a duplicate of http://www.intellij.net/forums/thread.jsp?forum=18&thread=87296&tstart=0&trange=15

which is marked as fixed in 2014.

--Dave Griffith

0
Comment actions Permalink

(way out of topic, Dave did you see my messages on the
MetricsReloaded 0.2 thread?)

Vince.


0
Comment actions Permalink

Yup. Haven't decided on all of them, but they are in consideration.

--Dave Griffith

0
Comment actions Permalink

Great! Thanks!

Raymond

0

Please sign in to leave a comment.