From 15e9636b79f179e310e1f66425df00713088af2c Mon Sep 17 00:00:00 2001 From: Graham Date: Thu, 26 Dec 2019 21:00:11 +0000 Subject: [PATCH] Replace Guava ImmutableList with Kotlin List in ClassPath --- .../java/dev/openrs2/asm/classpath/ClassPath.kt | 3 +-- deob/src/main/java/dev/openrs2/deob/Deobfuscator.kt | 13 ++++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.kt b/asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.kt index 87d7a318b6..cea22f12bd 100644 --- a/asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.kt +++ b/asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.kt @@ -1,6 +1,5 @@ package dev.openrs2.asm.classpath -import com.google.common.collect.ImmutableList import dev.openrs2.asm.MemberDesc import dev.openrs2.asm.MemberRef import dev.openrs2.common.collect.DisjointSet @@ -10,7 +9,7 @@ import org.objectweb.asm.tree.ClassNode class ClassPath( private val runtime: ClassLoader, - private val dependencies: ImmutableList, + private val dependencies: List, val libraries: List ) { private val cache = mutableMapOf() diff --git a/deob/src/main/java/dev/openrs2/deob/Deobfuscator.kt b/deob/src/main/java/dev/openrs2/deob/Deobfuscator.kt index 88fde2d3cd..e91415e4cf 100644 --- a/deob/src/main/java/dev/openrs2/deob/Deobfuscator.kt +++ b/deob/src/main/java/dev/openrs2/deob/Deobfuscator.kt @@ -1,7 +1,6 @@ package dev.openrs2.deob import com.github.michaelbull.logging.InlineLogger -import com.google.common.collect.ImmutableList import dev.openrs2.asm.classpath.ClassPath import dev.openrs2.asm.classpath.Library import dev.openrs2.asm.classpath.Library.Companion.readJar @@ -68,18 +67,18 @@ class Deobfuscator(private val input: Path, private val output: Path) { val runtime = ClassLoader.getPlatformClassLoader() val classPath = ClassPath( runtime, - ImmutableList.of(), - ImmutableList.of(client, loader, signLink, unpack, unpacker) + listOf(), + listOf(client, loader, signLink, unpack, unpacker) ) val glClassPath = ClassPath( runtime, - ImmutableList.of(gl, glDri), - ImmutableList.of(glClient, glLoader, glSignLink, glUnpack, glUnpacker) + listOf(gl, glDri), + listOf(glClient, glLoader, glSignLink, glUnpack, glUnpacker) ) val unsignedClassPath = ClassPath( runtime, - ImmutableList.of(), - ImmutableList.of(unsignedClient) + listOf(), + listOf(unsignedClient) ) // deobfuscate