When moving a static method which is referred to by another method's javadoc, the searching for usages dialog comes up (empty) and IDEA freezes. To resolve click cancel and close that dialog box physically. I have clipped the console stack trace and included the source for a test case. Simply create another empty class and move either method to the new class.
On a side, but related note, if I move a member which is javadoc'ed, and the javadoc has a local reference which becomes non-local because of the move, it should be changed upon the move. Currently it is not.
Stack trace and source code below:
java.lang.ClassCastException: com.intellij.psi.impl.source.b.d
at com.intellij.refactoring.j.c.i.a(i.java:88)
at com.intellij.refactoring.m.f.run(f.java:1)
at com.intellij.psi.impl.n.run(n.java:5)
at com.intellij.vfs.VirtualFileManager.a(VirtualFileManager.java:24)
at com.intellij.psi.impl.v.b(v.java:122)
at com.intellij.refactoring.m.e.run(e.java)
at com.intellij.usageView.e.run(e.java)
at com.intellij.progress.ProgressManager.a(ProgressManager.java:19)
at com.intellij.usageView.c.b(c.java:5)
at com.intellij.usageView.c.c(c.java:19)
at com.intellij.usageView.d.run(d.java)
at java.lang.Thread.run(Thread.java:484)
----------------------------------------------------------------------------
package some.dumb.test;
public class
FooUtil
{
/**
* unlike {@link #printArgs1}, this prints all <tt>args</tt>
* on one line.
* @param args the args you wish to print
* @see #printArgs1
*/
public static void printArgs2( String[] args ) {
StringBuffer Msg = new StringBuffer();
for ( int i = 0, length = args.length; i < length; i++ ) {
String arg = args[i];
Msg.append(arg);
if ( i != ( length - 1 ) ) {
Msg.append( ",");
}
}
System.out.println( Msg.toString() );
}
/**
* unlike {@link #printArgs2}, this prints each arg in <tt>args</tt>
* on its own line.
* @param args the args you wish to print
* @see #printArgs2
*/
public static void printArgs1( String[] args ) {
for ( int i = 0, length = args.length; i < length; i++ ) {
String arg = args[i];
System.out.println( "arg = " + arg );
}
}
}
