Skip to content

Commit 9cb8c2f

Browse files
committed
Remove previous testing logging
1 parent ed9795f commit 9cb8c2f

File tree

1 file changed

+3
-5
lines changed
  • src/main/java/io/github/fabriccompatibilitylayers/modremappingapi/impl/remapper

1 file changed

+3
-5
lines changed

src/main/java/io/github/fabriccompatibilitylayers/modremappingapi/impl/remapper/SoftLockFixer.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package io.github.fabriccompatibilitylayers.modremappingapi.impl.remapper;
22

3-
import fr.catcore.modremapperapi.utils.Constants;
43
import net.fabricmc.loader.api.FabricLoader;
54
import net.fabricmc.loader.impl.launch.FabricLauncherBase;
65
import org.jetbrains.annotations.ApiStatus;
@@ -49,8 +48,7 @@ public static void preloadClasses() {
4948

5049
for (String clazz : toCheck) {
5150
try {
52-
Constants.MAIN_LOGGER.info("Preloading class: " + clazz);
53-
Class.forName(clazz, false, cl);
51+
if (!clazz.startsWith("META-INF.versions")) Class.forName(clazz, false, cl);
5452
} catch (ClassNotFoundException | NoClassDefFoundError | UnsupportedClassVersionError e) {
5553
if (!clazz.startsWith("META-INF.versions")) throw new RuntimeException(e);
5654
}
@@ -85,8 +83,8 @@ private static Stream<String> getEntries(String pkg, String locatorClass) throws
8583
URL url = cl.getResource(locatorClass + ".class");
8684

8785
URLConnection connection = url.openConnection();
88-
return connection instanceof JarURLConnection ?
89-
((JarURLConnection) connection).getJarFile().stream()
86+
return connection instanceof JarURLConnection jarConnection ?
87+
jarConnection.getJarFile().stream()
9088
.filter(jarEntry -> jarEntry.getName().contains(pkg) && jarEntry.getName().endsWith(".class"))
9189
.map(jarEntry -> jarEntry.getName().replace("/", ".").replace(".class", ""))
9290
: Stream.empty();

0 commit comments

Comments
 (0)