diff --git a/platform/analysis-api/intellij.platform.analysis.iml b/platform/analysis-api/intellij.platform.analysis.iml
index 52a6fd624962..67800999ab2d 100644
--- a/platform/analysis-api/intellij.platform.analysis.iml
+++ b/platform/analysis-api/intellij.platform.analysis.iml
@@ -13,9 +13,10 @@
-
+
+
\ No newline at end of file
diff --git a/platform/bootstrap/src/com/intellij/util/lang/DirectByteBufferBackedInputStream.java b/platform/bootstrap/src/com/intellij/util/lang/DirectByteBufferBackedInputStream.java
index 5b03b22fef2f..205f8c12d3ee 100644
--- a/platform/bootstrap/src/com/intellij/util/lang/DirectByteBufferBackedInputStream.java
+++ b/platform/bootstrap/src/com/intellij/util/lang/DirectByteBufferBackedInputStream.java
@@ -1,14 +1,13 @@
-// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.util.lang;
import com.intellij.util.io.DirectByteBufferPool;
-import com.intellij.util.io.InputStreamEx;
import org.jetbrains.annotations.NotNull;
import java.io.InputStream;
import java.nio.ByteBuffer;
-final class DirectByteBufferBackedInputStream extends InputStream implements InputStreamEx {
+final class DirectByteBufferBackedInputStream extends InputStream {
private ByteBuffer buffer;
DirectByteBufferBackedInputStream(ByteBuffer buffer) {
diff --git a/platform/bootstrap/src/com/intellij/util/lang/ZipResourceFile.java b/platform/bootstrap/src/com/intellij/util/lang/ZipResourceFile.java
index 576c59a88795..08481477631f 100644
--- a/platform/bootstrap/src/com/intellij/util/lang/ZipResourceFile.java
+++ b/platform/bootstrap/src/com/intellij/util/lang/ZipResourceFile.java
@@ -152,11 +152,6 @@ public final class ZipResourceFile implements ResourceFile {
return new ZipFileResource(jarLoader.url, entry, zipFile);
}
- @Override
- public void close() throws IOException {
- zipFile.close();
- }
-
private static final class ZipFileResource implements Resource {
private final URL baseUrl;
private URL url;
diff --git a/platform/code-style-impl/intellij.platform.codeStyle.impl.iml b/platform/code-style-impl/intellij.platform.codeStyle.impl.iml
index d8bacfd24232..66350d926080 100644
--- a/platform/code-style-impl/intellij.platform.codeStyle.impl.iml
+++ b/platform/code-style-impl/intellij.platform.codeStyle.impl.iml
@@ -15,5 +15,6 @@
+
\ No newline at end of file
diff --git a/platform/code-style-impl/src/com/intellij/formatting/FormattingProgressTask.java b/platform/code-style-impl/src/com/intellij/formatting/FormattingProgressTask.java
index dd897677da1f..2a9f2d0a7ded 100644
--- a/platform/code-style-impl/src/com/intellij/formatting/FormattingProgressTask.java
+++ b/platform/code-style-impl/src/com/intellij/formatting/FormattingProgressTask.java
@@ -1,4 +1,4 @@
-// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.formatting;
import com.intellij.CodeStyleBundle;
@@ -166,7 +166,7 @@ public final class FormattingProgressTask extends SequentialModalProgressTask im
}
}
- private class MyCancelCallback implements Runnable {
+ private final class MyCancelCallback implements Runnable {
@Override
public void run() {
FORMATTING_CANCELLED_FLAG.set(true);
diff --git a/platform/code-style-impl/src/com/intellij/psi/formatter/FormattingDocumentModelImpl.java b/platform/code-style-impl/src/com/intellij/psi/formatter/FormattingDocumentModelImpl.java
index 74a2f0cde2df..b209ff30f248 100644
--- a/platform/code-style-impl/src/com/intellij/psi/formatter/FormattingDocumentModelImpl.java
+++ b/platform/code-style-impl/src/com/intellij/psi/formatter/FormattingDocumentModelImpl.java
@@ -1,5 +1,4 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
-
+// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.psi.formatter;
import com.intellij.application.options.CodeStyle;
@@ -22,8 +21,7 @@ import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-public class FormattingDocumentModelImpl implements FormattingDocumentModel {
-
+public final class FormattingDocumentModelImpl implements FormattingDocumentModel {
private final WhiteSpaceFormattingStrategy myWhiteSpaceStrategy;
@NotNull private final Document myDocument;
@NotNull private final PsiFile myFile;
diff --git a/platform/code-style-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleManagerImpl.java b/platform/code-style-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleManagerImpl.java
index 020c1fff22b8..54172a9831a0 100644
--- a/platform/code-style-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleManagerImpl.java
+++ b/platform/code-style-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleManagerImpl.java
@@ -1,5 +1,4 @@
-// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
-
+// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.psi.impl.source.codeStyle;
import com.intellij.CodeStyleBundle;
diff --git a/platform/util-class-loader/src/com/intellij/util/lang/JarLoader.java b/platform/util-class-loader/src/com/intellij/util/lang/JarLoader.java
index 3270406ebb96..c1dd8b1dcae6 100644
--- a/platform/util-class-loader/src/com/intellij/util/lang/JarLoader.java
+++ b/platform/util-class-loader/src/com/intellij/util/lang/JarLoader.java
@@ -151,13 +151,6 @@ public class JarLoader extends Loader {
}
}
- protected final void releaseZipFile(@NotNull ResourceFile zipFile) throws IOException {
- // Closing of zip file when configuration.canLockJars=true happens in ZipFile.finalize
- if (!configuration.lockJars) {
- zipFile.close();
- }
- }
-
@Override
public final String toString() {
return "JarLoader [" + path + "]";
diff --git a/platform/util-class-loader/src/com/intellij/util/lang/JdkZipResourceFile.java b/platform/util-class-loader/src/com/intellij/util/lang/JdkZipResourceFile.java
index 3057604c313d..6ed28e44297e 100644
--- a/platform/util-class-loader/src/com/intellij/util/lang/JdkZipResourceFile.java
+++ b/platform/util-class-loader/src/com/intellij/util/lang/JdkZipResourceFile.java
@@ -101,7 +101,6 @@ public final class JdkZipResourceFile implements ResourceFile {
return isSecureLoader ? new JarFile(file) : new ZipFile(file);
}
- @Override
public void close() throws IOException {
SoftReference ref = zipFileSoftReference;
ZipFile zipFile = ref == null ? null : ref.get();
@@ -173,7 +172,7 @@ public final class JdkZipResourceFile implements ResourceFile {
return new SecureJarResource(jarLoader.url, (JarEntry)entry, (SecureJarLoader)jarLoader);
}
else {
- return new ZipFileResource(jarLoader.url, entry, jarLoader);
+ return new ZipFileResource(jarLoader.url, entry, this);
}
}
finally {
@@ -267,12 +266,12 @@ public final class JdkZipResourceFile implements ResourceFile {
protected final URL baseUrl;
private URL url;
protected final ZipEntry entry;
- protected final JarLoader jarLoader;
+ protected final JdkZipResourceFile file;
- private ZipFileResource(@NotNull URL baseUrl, @NotNull ZipEntry entry, @NotNull JarLoader jarLoader) {
+ private ZipFileResource(@NotNull URL baseUrl, @NotNull ZipEntry entry, @NotNull JdkZipResourceFile file) {
this.baseUrl = baseUrl;
this.entry = entry;
- this.jarLoader = jarLoader;
+ this.file = file;
}
@Override
@@ -302,29 +301,31 @@ public final class JdkZipResourceFile implements ResourceFile {
@Override
public byte @NotNull [] getBytes() throws IOException {
- JdkZipResourceFile file = (JdkZipResourceFile)jarLoader.zipFile;
try (InputStream stream = file.getZipFile().getInputStream(entry)) {
return loadBytes(stream, (int)entry.getSize());
}
finally {
- jarLoader.releaseZipFile(file);
+ if (!file.lockJars) {
+ file.close();
+ }
}
}
}
private static final class SecureJarResource extends JdkZipResourceFile.ZipFileResource {
SecureJarResource(@NotNull URL baseUrl, @NotNull JarEntry entry, @NotNull SecureJarLoader jarLoader) {
- super(baseUrl, entry, jarLoader);
+ super(baseUrl, entry, (JdkZipResourceFile)jarLoader.zipFile);
}
@Override
public byte @NotNull [] getBytes() throws IOException {
- JdkZipResourceFile resourceFile = (JdkZipResourceFile)jarLoader.zipFile;
- try (InputStream stream = resourceFile.getZipFile().getInputStream(entry)) {
+ try (InputStream stream = file.getZipFile().getInputStream(entry)) {
return loadBytes(stream, (int)entry.getSize());
}
finally {
- jarLoader.releaseZipFile(resourceFile);
+ if (!file.lockJars) {
+ file.close();
+ }
}
}
}
diff --git a/platform/util-class-loader/src/com/intellij/util/lang/ResourceFile.java b/platform/util-class-loader/src/com/intellij/util/lang/ResourceFile.java
index b88946a89384..366f16eb9423 100644
--- a/platform/util-class-loader/src/com/intellij/util/lang/ResourceFile.java
+++ b/platform/util-class-loader/src/com/intellij/util/lang/ResourceFile.java
@@ -4,14 +4,13 @@ package com.intellij.util.lang;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.util.function.BiConsumer;
import java.util.function.Predicate;
import java.util.jar.Attributes;
-public interface ResourceFile extends Closeable {
+public interface ResourceFile {
@Nullable Attributes loadManifestAttributes() throws IOException;
@NotNull ClasspathCache.IndexRegistrar buildClassPathCacheData() throws IOException;
diff --git a/platform/util/src/com/intellij/util/ResourceUtil.java b/platform/util-ex/src/com/intellij/util/ResourceUtil.java
similarity index 87%
rename from platform/util/src/com/intellij/util/ResourceUtil.java
rename to platform/util-ex/src/com/intellij/util/ResourceUtil.java
index f948a9ebdd80..6c2c41531feb 100644
--- a/platform/util/src/com/intellij/util/ResourceUtil.java
+++ b/platform/util-ex/src/com/intellij/util/ResourceUtil.java
@@ -1,11 +1,8 @@
-// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.util;
-import com.intellij.openapi.util.io.BufferExposingByteArrayOutputStream;
-import com.intellij.openapi.util.io.FileUtilRt;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.util.text.Strings;
-import com.intellij.util.io.InputStreamEx;
import com.intellij.util.io.URLUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
@@ -40,7 +37,6 @@ public final class ResourceUtil {
public static InputStream getResourceAsStream(@NotNull ClassLoader loader, @NonNls @NotNull String basePath, @NonNls @NotNull String fileName) {
String fixedPath = StringUtil.trimStart(Strings.trimEnd(basePath, "/"), "/");
-
if (fixedPath.isEmpty()) {
return loader.getResourceAsStream(fileName);
}
@@ -136,14 +132,7 @@ public final class ResourceUtil {
public static @NotNull String loadText(@NotNull InputStream in) throws IOException {
try {
- if (in instanceof InputStreamEx) {
- return new String(((InputStreamEx)in).readAllBytes(), StandardCharsets.UTF_8);
- }
- else {
- BufferExposingByteArrayOutputStream buffer = new BufferExposingByteArrayOutputStream();
- FileUtilRt.copy(in, buffer);
- return new String(buffer.getInternalBuffer(), 0, buffer.size(), StandardCharsets.UTF_8);
- }
+ return new String(in.readAllBytes(), StandardCharsets.UTF_8);
}
finally {
in.close();
diff --git a/platform/util-rt/src/com/intellij/util/io/InputStreamEx.java b/platform/util-rt/src/com/intellij/util/io/InputStreamEx.java
deleted file mode 100644
index a7f7c1fa3efb..000000000000
--- a/platform/util-rt/src/com/intellij/util/io/InputStreamEx.java
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
-package com.intellij.util.io;
-
-import com.intellij.ReviseWhenPortedToJDK;
-import org.jetbrains.annotations.ApiStatus;
-import org.jetbrains.annotations.NotNull;
-
-import java.io.IOException;
-
-@ApiStatus.Internal
-public interface InputStreamEx {
- @NotNull
- @ReviseWhenPortedToJDK("9") // there's is java.io.InputStream.readAllBytes
- byte [] readAllBytes() throws IOException;
-}
diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/ApplyPatchDifferentiatedDialog.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/ApplyPatchDifferentiatedDialog.java
index 42eb99fb6d62..cae41aa615aa 100644
--- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/ApplyPatchDifferentiatedDialog.java
+++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/ApplyPatchDifferentiatedDialog.java
@@ -1,4 +1,4 @@
-// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.vcs.changes.patch;
import com.intellij.diff.DiffDialogHints;
@@ -52,7 +52,6 @@ import com.intellij.openapi.vfs.newvfs.events.VFileEvent;
import com.intellij.ui.*;
import com.intellij.ui.components.JBLoadingPanel;
import com.intellij.util.Alarm;
-import com.intellij.util.NullableConsumer;
import com.intellij.util.concurrency.annotations.RequiresEdt;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.containers.MultiMap;
@@ -74,6 +73,7 @@ import java.io.InputStreamReader;
import java.util.List;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
import java.util.function.Supplier;
import static com.intellij.openapi.util.text.StringUtil.isEmptyOrSpaces;
@@ -82,7 +82,6 @@ import static com.intellij.util.ObjectUtils.chooseNotNull;
import static com.intellij.util.containers.ContainerUtil.map;
public class ApplyPatchDifferentiatedDialog extends DialogWrapper {
-
private static final Logger LOG = Logger.getInstance(ApplyPatchDifferentiatedDialog.class);
private final ZipperUpdater myLoadQueue;
private final TextFieldWithBrowseButton myPatchFile;
@@ -206,9 +205,9 @@ public class ApplyPatchDifferentiatedDialog extends DialogWrapper {
ChangeListManager changeListManager = ChangeListManager.getInstance(project);
if (changeListManager.areChangeListsEnabled()) {
- myChangeListChooser = new ChangeListChooserPanel(project, new NullableConsumer<>() {
+ myChangeListChooser = new ChangeListChooserPanel(project, new Consumer<>() {
@Override
- public void consume(final @Nullable @NlsContexts.DialogMessage String errorMessage) {
+ public void accept(final @Nullable @NlsContexts.DialogMessage String errorMessage) {
setOKActionEnabled(errorMessage == null && isChangeTreeEnabled());
setErrorText(errorMessage, myChangeListChooser);
}
diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeListChooser.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeListChooser.java
index fe4957b9c4b8..f309a7406ffb 100644
--- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeListChooser.java
+++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeListChooser.java
@@ -1,18 +1,18 @@
-// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.vcs.changes.ui;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
+import com.intellij.openapi.util.NlsContexts;
import com.intellij.openapi.vcs.changes.ChangeList;
import com.intellij.openapi.vcs.changes.LocalChangeList;
-import com.intellij.util.NullableConsumer;
-import com.intellij.openapi.util.NlsContexts;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.util.Collection;
+import java.util.function.Consumer;
public class ChangeListChooser extends DialogWrapper {
private final Project myProject;
@@ -27,9 +27,9 @@ public class ChangeListChooser extends DialogWrapper {
super(project, false);
myProject = project;
- myPanel = new ChangeListChooserPanel(myProject, new NullableConsumer<>() {
+ myPanel = new ChangeListChooserPanel(myProject, new Consumer<>() {
@Override
- public void consume(final @Nullable @NlsContexts.DialogMessage String errorMessage) {
+ public void accept(final @Nullable @NlsContexts.DialogMessage String errorMessage) {
setOKActionEnabled(errorMessage == null);
setErrorText(errorMessage, myPanel);
}
diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeListChooserPanel.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeListChooserPanel.java
index e43603c8b5f7..1f8d2c3755d2 100644
--- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeListChooserPanel.java
+++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeListChooserPanel.java
@@ -1,4 +1,4 @@
-// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.vcs.changes.ui;
import com.intellij.openapi.application.ApplicationManager;
@@ -15,7 +15,6 @@ import com.intellij.openapi.vcs.VcsConfiguration;
import com.intellij.openapi.vcs.changes.*;
import com.intellij.ui.*;
import com.intellij.ui.scale.JBUIScale;
-import com.intellij.util.NullableConsumer;
import com.intellij.util.concurrency.annotations.RequiresEdt;
import com.intellij.util.ui.JBUI;
import org.jetbrains.annotations.Nls;
@@ -28,18 +27,18 @@ import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.util.Collection;
import java.util.Objects;
+import java.util.function.Consumer;
-public class ChangeListChooserPanel extends JPanel {
-
+public final class ChangeListChooserPanel extends JPanel {
private final MyEditorComboBox myExistingListsCombo;
private final NewEditChangelistPanel myListPanel;
- private final NullableConsumer super String> myOkEnabledListener;
+ private final Consumer super String> myOkEnabledListener;
private final Project myProject;
private String myLastTypedDescription;
private boolean myNewNameSuggested = false;
@Nullable private ChangeListData myData;
- public ChangeListChooserPanel(final Project project, @NotNull final NullableConsumer super String> okEnabledListener) {
+ public ChangeListChooserPanel(final Project project, @NotNull Consumer super @Nullable String> okEnabledListener) {
super(new BorderLayout());
myProject = project;
myExistingListsCombo = new MyEditorComboBox();
@@ -77,7 +76,7 @@ public class ChangeListChooserPanel extends JPanel {
protected void nameChanged(String errorMessage) {
//invoke later because of undo manager problem: when you try to undo changelist after description was already changed manually
ApplicationManager.getApplication().invokeLater(() -> updateDescription(), ModalityState.current());
- myOkEnabledListener.consume(errorMessage);
+ myOkEnabledListener.accept(errorMessage);
}
@Override
diff --git a/python/python-psi-impl/intellij.python.psi.impl.iml b/python/python-psi-impl/intellij.python.psi.impl.iml
index 3548b686d00f..384a3fb2e5e3 100644
--- a/python/python-psi-impl/intellij.python.psi.impl.iml
+++ b/python/python-psi-impl/intellij.python.psi.impl.iml
@@ -24,5 +24,6 @@
+
\ No newline at end of file
diff --git a/xml/xml-analysis-impl/intellij.xml.analysis.impl.iml b/xml/xml-analysis-impl/intellij.xml.analysis.impl.iml
index f5db4082977e..883f7bcc6ec6 100644
--- a/xml/xml-analysis-impl/intellij.xml.analysis.impl.iml
+++ b/xml/xml-analysis-impl/intellij.xml.analysis.impl.iml
@@ -14,5 +14,6 @@
+
\ No newline at end of file
diff --git a/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/RenameTagBeginOrEndIntentionAction.java b/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/RenameTagBeginOrEndIntentionAction.java
index c8b79f49f843..93a4026ee3d1 100644
--- a/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/RenameTagBeginOrEndIntentionAction.java
+++ b/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/RenameTagBeginOrEndIntentionAction.java
@@ -1,19 +1,4 @@
-/*
- * Copyright 2000-2013 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.
- */
-
+// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInspection.htmlInspections;
import com.intellij.codeInsight.intention.IntentionAction;
@@ -22,11 +7,7 @@ import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.TextRange;
-import com.intellij.psi.PsiDocumentManager;
-import com.intellij.psi.PsiElement;
-import com.intellij.psi.PsiErrorElement;
-import com.intellij.psi.PsiFile;
-import com.intellij.psi.PsiWhiteSpace;
+import com.intellij.psi.*;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.psi.xml.XmlTag;
@@ -38,10 +19,7 @@ import com.intellij.xml.util.XmlTagUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-/**
- * @author spleaner
- */
-public class RenameTagBeginOrEndIntentionAction implements IntentionAction {
+public final class RenameTagBeginOrEndIntentionAction implements IntentionAction {
private final boolean myStart;
private final String myTargetName;
private final String mySourceName;
diff --git a/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/SwitchToHtml5Action.java b/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/SwitchToHtml5Action.java
index ae9eb94c851a..18db75868315 100644
--- a/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/SwitchToHtml5Action.java
+++ b/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/SwitchToHtml5Action.java
@@ -1,18 +1,4 @@
-/*
- * Copyright 2000-2016 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.
- */
+// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInspection.htmlInspections;
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer;
@@ -34,7 +20,6 @@ import org.jetbrains.annotations.Nullable;
* @author Eugene.Kudelevsky
*/
public class SwitchToHtml5Action implements LocalQuickFix, IntentionAction {
-
@NotNull
@Override
public String getFamilyName() {
diff --git a/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/SwitchToHtml5WithHighPriorityAction.java b/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/SwitchToHtml5WithHighPriorityAction.java
index f8600218bd9f..937b137122e2 100644
--- a/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/SwitchToHtml5WithHighPriorityAction.java
+++ b/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/SwitchToHtml5WithHighPriorityAction.java
@@ -1,18 +1,4 @@
-/*
- * Copyright 2000-2013 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.
- */
+// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInspection.htmlInspections;
import com.intellij.codeInsight.intention.HighPriorityAction;
@@ -20,5 +6,5 @@ import com.intellij.codeInsight.intention.HighPriorityAction;
/**
* @author Eugene.Kudelevsky
*/
-public class SwitchToHtml5WithHighPriorityAction extends SwitchToHtml5Action implements HighPriorityAction {
+public final class SwitchToHtml5WithHighPriorityAction extends SwitchToHtml5Action implements HighPriorityAction {
}
diff --git a/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/XmlWrongRootElementInspection.java b/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/XmlWrongRootElementInspection.java
index 56480794773c..28fcc0f7d8cf 100644
--- a/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/XmlWrongRootElementInspection.java
+++ b/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/XmlWrongRootElementInspection.java
@@ -1,19 +1,4 @@
-/*
- * 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.
- */
-
+// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInspection.htmlInspections;
import com.intellij.codeHighlighting.HighlightDisplayLevel;
@@ -34,10 +19,7 @@ import com.intellij.xml.util.XmlUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
-/**
- * @author spleaner
- */
-public class XmlWrongRootElementInspection extends HtmlLocalInspectionTool {
+public final class XmlWrongRootElementInspection extends HtmlLocalInspectionTool {
@Override
@NonNls
@NotNull
diff --git a/xml/xml-psi-api/intellij.xml.psi.iml b/xml/xml-psi-api/intellij.xml.psi.iml
index 540171d1babf..51d4b9c6676e 100644
--- a/xml/xml-psi-api/intellij.xml.psi.iml
+++ b/xml/xml-psi-api/intellij.xml.psi.iml
@@ -12,5 +12,6 @@
+
\ No newline at end of file