diff --git a/java/idea-ui/src/com/intellij/openapi/components/impl/stores/IdeaProjectStoreImpl.java b/java/idea-ui/src/com/intellij/openapi/components/impl/stores/IdeaProjectStoreImpl.java index 95a44bcad324..99eb9a1a9e36 100644 --- a/java/idea-ui/src/com/intellij/openapi/components/impl/stores/IdeaProjectStoreImpl.java +++ b/java/idea-ui/src/com/intellij/openapi/components/impl/stores/IdeaProjectStoreImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,6 +34,7 @@ class IdeaProjectStoreImpl extends ProjectWithModulesStoreImpl { @Override protected StateStorageManager createStateStorageManager() { return new ProjectStateStorageManager(myPathMacroManager.createTrackingSubstitutor(), myProject) { + @NotNull @Override public StorageData createIprStorageData(@NotNull String filePath) { return new IdeaIprStorageData(ROOT_TAG_NAME, myProject, filePath); diff --git a/platform/lang-impl/src/com/intellij/openapi/components/impl/stores/ModuleStateStorageManager.java b/platform/lang-impl/src/com/intellij/openapi/components/impl/stores/ModuleStateStorageManager.java index c52d6caee5e0..33d29ba99b8f 100644 --- a/platform/lang-impl/src/com/intellij/openapi/components/impl/stores/ModuleStateStorageManager.java +++ b/platform/lang-impl/src/com/intellij/openapi/components/impl/stores/ModuleStateStorageManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,6 +38,7 @@ class ModuleStateStorageManager extends StateStorageManagerImpl { myModule = module; } + @NotNull @Override protected StorageData createStorageData(@NotNull String fileSpec, @NotNull String filePath) { return new ModuleStoreImpl.ModuleFileData(ROOT_TAG_NAME, myModule); diff --git a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ApplicationStoreImpl.java b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ApplicationStoreImpl.java index 22ac3611ac82..5d52870675dc 100644 --- a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ApplicationStoreImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ApplicationStoreImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,6 +51,7 @@ class ApplicationStoreImpl extends ComponentStoreImpl implements IApplicationSto myStateStorageManager = new StateStorageManagerImpl(pathMacroManager.createTrackingSubstitutor(), ROOT_ELEMENT_NAME, application, application.getPicoContainer()) { private boolean myConfigDirectoryRefreshed; + @NotNull @Override protected StorageData createStorageData(@NotNull String fileSpec, @NotNull String filePath) { return new StorageData(ROOT_ELEMENT_NAME); diff --git a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStateStorageManager.java b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStateStorageManager.java index 685af00fd37f..7d3adc1e5b95 100644 --- a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStateStorageManager.java +++ b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStateStorageManager.java @@ -33,6 +33,7 @@ class ProjectStateStorageManager extends StateStorageManagerImpl { myProject = project; } + @NotNull @Override protected StorageData createStorageData(@NotNull String fileSpec, @NotNull String filePath) { if (fileSpec.equals(StoragePathMacros.PROJECT_FILE)) { @@ -46,6 +47,7 @@ class ProjectStateStorageManager extends StateStorageManagerImpl { } } + @NotNull protected StorageData createIprStorageData(@NotNull String filePath) { return new ProjectStoreImpl.IprStorageData(ROOT_TAG_NAME, myProject); } diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/components/impl/ApplicationStoreTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/components/impl/ApplicationStoreTest.java index 7c452f561463..d51f7ab9b9cc 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/components/impl/ApplicationStoreTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/components/impl/ApplicationStoreTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2000-2015 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.intellij.openapi.components.impl; import com.intellij.application.options.PathMacrosImpl; @@ -175,6 +190,7 @@ public class ApplicationStoreTest extends LightPlatformLangTestCase { MyComponentStore(@NotNull final String testAppConfigPath) { TrackingPathMacroSubstitutor macroSubstitutor = new ApplicationPathMacroManager().createTrackingSubstitutor(); stateStorageManager = new StateStorageManagerImpl(macroSubstitutor, "application", this, ApplicationManager.getApplication().getPicoContainer()) { + @NotNull @Override protected StorageData createStorageData(@NotNull String fileSpec, @NotNull String filePath) { return new StorageData("application"); diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/components/impl/StateStorageManagerImplTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/components/impl/StateStorageManagerImplTest.java index 7db6a3e6a3a5..8e96186e3adf 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/components/impl/StateStorageManagerImplTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/components/impl/StateStorageManagerImplTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,6 +40,7 @@ public class StateStorageManagerImplTest extends LightPlatformLangTestCase { public final void setUp() throws Exception { super.setUp(); myStateStorageManager = new StateStorageManagerImpl(null, "foo", null, ApplicationManager.getApplication().getPicoContainer()) { + @NotNull @Override protected StorageData createStorageData(@NotNull String fileSpec, @NotNull String filePath) { throw new UnsupportedOperationException("Method createStorageData not implemented in " + getClass());