From 5f41e3044b13421b42214108d272f5e682412e2e Mon Sep 17 00:00:00 2001 From: Nikita Bobko Date: Wed, 6 Oct 2021 15:52:54 +0200 Subject: [PATCH] [CHERRY PICKED FROM IJ] [refactoring] Remove unused PathFunctionPairKeyDescriptor & PathCollectionExternalizer classes GitOrigin-RevId: 6997f426f0912bb06da2e6fe1eb20e3d071dbc2a Original commit: https://github.com/JetBrains/intellij-community/commit/002855167085323051a051d0c147fa747f5cddce --- .../jps/incremental/storages/externalizers.kt | 45 ------------------- 1 file changed, 45 deletions(-) delete mode 100644 jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/storages/externalizers.kt diff --git a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/storages/externalizers.kt b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/storages/externalizers.kt deleted file mode 100644 index 5625caca6fa..00000000000 --- a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/storages/externalizers.kt +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2010-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. - */ - -package org.jetbrains.kotlin.jps.incremental.storages - -import com.intellij.openapi.util.io.FileUtil -import com.intellij.util.io.IOUtil -import com.intellij.util.io.KeyDescriptor -import gnu.trove.THashSet -import org.jetbrains.jps.incremental.storage.PathStringDescriptor -import org.jetbrains.kotlin.incremental.storage.CollectionExternalizer -import java.io.DataInput -import java.io.DataOutput - -object PathFunctionPairKeyDescriptor : KeyDescriptor { - override fun read(input: DataInput): PathFunctionPair { - val path = IOUtil.readUTF(input) - val function = IOUtil.readUTF(input) - return PathFunctionPair(path, function) - } - - override fun save(output: DataOutput, value: PathFunctionPair) { - IOUtil.writeUTF(output, value.path) - IOUtil.writeUTF(output, value.function) - } - - override fun getHashCode(value: PathFunctionPair): Int = value.hashCode() - - override fun isEqual(val1: PathFunctionPair, val2: PathFunctionPair): Boolean = val1 == val2 -} - -object PathCollectionExternalizer : CollectionExternalizer(PathStringDescriptor(), { THashSet(FileUtil.PATH_HASHING_STRATEGY) })