diff --git a/java/java-impl/src/com/intellij/refactoring/move/moveClassesOrPackages/DestinationFolderComboBox.java b/java/java-impl/src/com/intellij/refactoring/move/moveClassesOrPackages/DestinationFolderComboBox.java index d95b74376d8e..34560c28625d 100644 --- a/java/java-impl/src/com/intellij/refactoring/move/moveClassesOrPackages/DestinationFolderComboBox.java +++ b/java/java-impl/src/com/intellij/refactoring/move/moveClassesOrPackages/DestinationFolderComboBox.java @@ -177,7 +177,7 @@ public abstract class DestinationFolderComboBox extends ComboboxWithBrowseButton } final PsiDirectory selectedPsiDirectory = selectedItem.getDirectory(); VirtualFile selectedDestination = selectedPsiDirectory.getVirtualFile(); - if (showChooserWhenDefault && selectedDestination == myInitialTargetDirectory) { + if (showChooserWhenDefault && selectedDestination == myInitialTargetDirectory.getVirtualFile()) { selectedDestination = MoveClassesOrPackagesUtil.chooseSourceRoot(targetPackage, mySourceRoots, myInitialTargetDirectory); } if (selectedDestination == null) return null;