diff --git a/platform/lang-impl/src/com/intellij/psi/stubs/StubIndexImpl.java b/platform/lang-impl/src/com/intellij/psi/stubs/StubIndexImpl.java index ad14ceff36b9..d704b7954b8d 100644 --- a/platform/lang-impl/src/com/intellij/psi/stubs/StubIndexImpl.java +++ b/platform/lang-impl/src/com/intellij/psi/stubs/StubIndexImpl.java @@ -114,8 +114,8 @@ public final class StubIndexImpl extends StubIndexEx implements PersistentStateC return new FileBasedIndexExtension() { @Override public @NotNull ID getName() { - //noinspection unchecked - return (ID)extension.getKey(); + @SuppressWarnings("unchecked") ID key = (ID)extension.getKey(); + return key; } @Override @@ -747,4 +747,4 @@ public final class StubIndexImpl extends StubIndexEx implements PersistentStateC public boolean areAllProblemsProcessedInTheCurrentThread() { return myStubProcessingHelper.areAllProblemsProcessedInTheCurrentThread(); } -} +} \ No newline at end of file diff --git a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/FileDocumentManagerImpl.java b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/FileDocumentManagerImpl.java index 77f05c71a98a..7790f6f7cbb1 100644 --- a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/FileDocumentManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/FileDocumentManagerImpl.java @@ -592,14 +592,15 @@ public class FileDocumentManagerImpl extends FileDocumentManager implements Safe } private void propertyChanged(@NotNull VFilePropertyChangeEvent event) { - final VirtualFile file = event.getFile(); if (VirtualFile.PROP_WRITABLE.equals(event.getPropertyName())) { - final Document document = getCachedDocument(file); + VirtualFile file = event.getFile(); + Document document = getCachedDocument(file); if (document != null) { ApplicationManager.getApplication().runWriteAction((ExternalChangeAction)() -> document.setReadOnly(!file.isWritable())); } } else if (VirtualFile.PROP_NAME.equals(event.getPropertyName())) { + VirtualFile file = event.getFile(); Document document = getCachedDocument(file); if (document != null) { if (isBinaryWithoutDecompiler(file)) { @@ -620,13 +621,13 @@ public class FileDocumentManagerImpl extends FileDocumentManager implements Safe } private static boolean isBinaryWithDecompiler(@NotNull VirtualFile file) { - final FileType ft = file.getFileType(); - return ft.isBinary() && BinaryFileTypeDecompilers.getInstance().forFileType(ft) != null; + FileType type = file.getFileType(); + return type.isBinary() && BinaryFileTypeDecompilers.getInstance().forFileType(type) != null; } private static boolean isBinaryWithoutDecompiler(@NotNull VirtualFile file) { - final FileType fileType = file.getFileType(); - return fileType.isBinary() && BinaryFileTypeDecompilers.getInstance().forFileType(fileType) == null; + FileType type = file.getFileType(); + return type.isBinary() && BinaryFileTypeDecompilers.getInstance().forFileType(type) == null; } static final class MyAsyncFileListener implements AsyncFileListener { @@ -882,7 +883,7 @@ public class FileDocumentManagerImpl extends FileDocumentManager implements Safe /** @deprecated another dirty Rider hack; don't use */ @Deprecated - @SuppressWarnings("StaticNonFinalField") + @SuppressWarnings({"StaticNonFinalField", "DeprecatedIsStillUsed"}) public static boolean ourConflictsSolverEnabled = true; protected void cacheDocument(@NotNull VirtualFile file, @NotNull Document document) {