From 1fb19e9eceb440d4b6a0f0fb7d092f1a2f3b7fb3 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Fri, 9 Apr 2021 09:50:47 +0200 Subject: [PATCH] cleanup GitOrigin-RevId: f0cd4e748ecac8e91a8bf92fbd837133ae50f427 --- .../testFramework/EmptyFileBasedIndex.java | 4 ++-- .../util/containers/RecentStringInterner.java | 18 ++---------------- .../tasks-core/resources/META-INF/plugin.xml | 3 --- .../tasks/config/RecentTaskRepositories.java | 9 ++++----- 4 files changed, 8 insertions(+), 26 deletions(-) diff --git a/platform/testFramework/src/com/intellij/testFramework/EmptyFileBasedIndex.java b/platform/testFramework/src/com/intellij/testFramework/EmptyFileBasedIndex.java index 10f95f7357d7..793a14365a02 100644 --- a/platform/testFramework/src/com/intellij/testFramework/EmptyFileBasedIndex.java +++ b/platform/testFramework/src/com/intellij/testFramework/EmptyFileBasedIndex.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.testFramework; import com.intellij.openapi.progress.ProgressIndicator; @@ -21,7 +21,7 @@ import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.function.IntPredicate; -public class EmptyFileBasedIndex extends FileBasedIndexEx { +public final class EmptyFileBasedIndex extends FileBasedIndexEx { @Override public void registerProjectFileSets(@NotNull Project project) { } diff --git a/platform/util/src/com/intellij/util/containers/RecentStringInterner.java b/platform/util/src/com/intellij/util/containers/RecentStringInterner.java index 72e25edfcb72..2d167f79b3af 100644 --- a/platform/util/src/com/intellij/util/containers/RecentStringInterner.java +++ b/platform/util/src/com/intellij/util/containers/RecentStringInterner.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.util.containers; import com.intellij.openapi.Disposable; @@ -24,7 +10,7 @@ import org.jetbrains.annotations.Nullable; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; -public class RecentStringInterner { +public final class RecentStringInterner { private final int myStripeMask; private final SLRUCache[] myInterns; private final Lock[] myStripeLocks; diff --git a/plugins/tasks/tasks-core/resources/META-INF/plugin.xml b/plugins/tasks/tasks-core/resources/META-INF/plugin.xml index 5df88fafc1d8..5cdec8457c66 100644 --- a/plugins/tasks/tasks-core/resources/META-INF/plugin.xml +++ b/plugins/tasks/tasks-core/resources/META-INF/plugin.xml @@ -1,7 +1,6 @@ - com.intellij.tasks Task Management @@ -107,7 +106,6 @@ - @@ -149,5 +147,4 @@ - diff --git a/plugins/tasks/tasks-core/src/com/intellij/tasks/config/RecentTaskRepositories.java b/plugins/tasks/tasks-core/src/com/intellij/tasks/config/RecentTaskRepositories.java index c4c4a27e5222..f1338d7c64dc 100644 --- a/plugins/tasks/tasks-core/src/com/intellij/tasks/config/RecentTaskRepositories.java +++ b/plugins/tasks/tasks-core/src/com/intellij/tasks/config/RecentTaskRepositories.java @@ -1,11 +1,9 @@ -// 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.tasks.config; import com.intellij.openapi.Disposable; import com.intellij.openapi.application.ApplicationManager; -import com.intellij.openapi.components.PersistentStateComponent; -import com.intellij.openapi.components.State; -import com.intellij.openapi.components.Storage; +import com.intellij.openapi.components.*; import com.intellij.openapi.util.text.StringUtil; import com.intellij.tasks.TaskRepository; import com.intellij.tasks.TaskRepositoryType; @@ -23,7 +21,8 @@ import java.util.*; /** * @author Dmitry Avdeev */ -@State(name = "RecentTaskRepositories", storages = @Storage("other.xml")) +@State(name = "RecentTaskRepositories", storages = @Storage(StoragePathMacros.NON_ROAMABLE_FILE)) +@Service(Service.Level.APP) public final class RecentTaskRepositories implements PersistentStateComponent, Disposable { private final Set myRepositories = new ObjectOpenCustomHashSet<>(HASHING_STRATEGY);