diff --git a/java/java-tests/testSrc/com/intellij/roots/MultiModuleEditingTest.java b/java/java-tests/testSrc/com/intellij/roots/MultiModuleEditingTest.java index dd156cff1005..44c2597fc576 100644 --- a/java/java-tests/testSrc/com/intellij/roots/MultiModuleEditingTest.java +++ b/java/java-tests/testSrc/com/intellij/roots/MultiModuleEditingTest.java @@ -70,8 +70,8 @@ public class MultiModuleEditingTest extends ModuleTestCase { { final ModifiableModuleModel modifiableModel = moduleManager.getModifiableModel(); - moduleA = modifiableModel.newModule(new File("a.iml").getAbsolutePath(), StdModuleTypes.JAVA.getId()); - moduleB = modifiableModel.newModule(new File("b.iml").getAbsolutePath(), StdModuleTypes.JAVA.getId()); + moduleA = modifiableModel.newModule("a.iml", StdModuleTypes.JAVA.getId()); + moduleB = modifiableModel.newModule("b.iml", StdModuleTypes.JAVA.getId()); assertEquals("Changes are not applied until commit", 0, moduleManager.getModules().length); //noinspection SSBasedInspection moduleListener.assertCorrectEvents(new String[0][]); @@ -107,8 +107,8 @@ public class MultiModuleEditingTest extends ModuleTestCase { final Module moduleB; { final ModifiableModuleModel moduleModel = moduleManager.getModifiableModel(); - moduleA = moduleModel.newModule(new File("a.iml").getAbsolutePath(), StdModuleTypes.JAVA.getId()); - moduleB = moduleModel.newModule(new File("b.iml").getAbsolutePath(), StdModuleTypes.JAVA.getId()); + moduleA = moduleModel.newModule("a.iml", StdModuleTypes.JAVA.getId()); + moduleB = moduleModel.newModule("b.iml", StdModuleTypes.JAVA.getId()); final ModifiableRootModel rootModelA = ModuleRootManager.getInstance(moduleA).getModifiableModel(); final ModifiableRootModel rootModelB = ModuleRootManager.getInstance(moduleB).getModifiableModel(); rootModelB.addModuleOrderEntry(moduleA); @@ -146,9 +146,9 @@ public class MultiModuleEditingTest extends ModuleTestCase { { final ModifiableModuleModel moduleModel = moduleManager.getModifiableModel(); - moduleA = moduleModel.newModule(new File("a.iml").getAbsolutePath(), StdModuleTypes.JAVA.getId()); - moduleB = moduleModel.newModule(new File("b.iml").getAbsolutePath(), StdModuleTypes.JAVA.getId()); - final Module moduleC = moduleModel.newModule(new File("c.iml").getAbsolutePath(), StdModuleTypes.JAVA.getId()); + moduleA = moduleModel.newModule("a.iml", StdModuleTypes.JAVA.getId()); + moduleB = moduleModel.newModule("b.iml", StdModuleTypes.JAVA.getId()); + final Module moduleC = moduleModel.newModule("c.iml", StdModuleTypes.JAVA.getId()); final ModifiableRootModel rootModelB = ModuleRootManager.getInstance(moduleB).getModifiableModel(); rootModelB.addModuleOrderEntry(moduleC); moduleModel.disposeModule(moduleC); diff --git a/platform/configuration-store-impl/src/com/intellij/openapi/components/impl/stores/StateStorageManagerImpl.java b/platform/configuration-store-impl/src/com/intellij/openapi/components/impl/stores/StateStorageManagerImpl.java index f5d48c3bd316..af2a65e6550f 100644 --- a/platform/configuration-store-impl/src/com/intellij/openapi/components/impl/stores/StateStorageManagerImpl.java +++ b/platform/configuration-store-impl/src/com/intellij/openapi/components/impl/stores/StateStorageManagerImpl.java @@ -175,14 +175,13 @@ public abstract class StateStorageManagerImpl implements StateStorageManager, Di ((MutablePicoContainer)myPicoContainer).registerComponentImplementation(key, storageClass); return (StateStorage)myPicoContainer.getComponentInstance(key); } - final String filePath = expandMacros(fileSpec); - File file = new File(filePath).getAbsoluteFile(); + + String filePath = expandMacros(fileSpec); + File file = new File(filePath); //noinspection deprecation if (!stateSplitter.equals(StateSplitter.class) && !stateSplitter.equals(StateSplitterEx.class)) { - @SuppressWarnings("deprecation") - StateSplitter splitter = ReflectionUtil.newInstance(stateSplitter); - return new DirectoryBasedStorage(myPathMacroSubstitutor, file, splitter, this, createStorageTopicListener()); + return new DirectoryBasedStorage(myPathMacroSubstitutor, file, ReflectionUtil.newInstance(stateSplitter), this, createStorageTopicListener()); } if (!ApplicationManager.getApplication().isHeadlessEnvironment() && PathUtilRt.getFileName(filePath).lastIndexOf('.') < 0) {