Use internal classnames when injecting interfaces

This commit is contained in:
Adam
2016-03-20 17:30:59 -04:00
parent 9b1f5720b0
commit 488c11abfa
2 changed files with 5 additions and 6 deletions

View File

@@ -1,10 +1,7 @@
package net.runelite.deob.injection;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import net.runelite.deob.ClassFile;
import net.runelite.deob.ClassGroup;
import net.runelite.deob.Field;
@@ -221,7 +218,9 @@ public class Inject
return null;
String ifaceName = API_PACKAGE_BASE + a.getElement().getString();
Class clazz = new Class(ifaceName);
String ifaceNameInternal = ifaceName.replace('.', '/'); // to internal name
Class clazz = new Class(ifaceNameInternal);
Interfaces interfaces = other.getInterfaces();
interfaces.addInterface(clazz);

View File

@@ -10,8 +10,8 @@ import org.junit.Test;
public class InjectTest
{
private static final File DEOBFUSCATED = new File("C:\\Users\\Adam\\.m2\\repository\\net\\runelite\\rs\\rs-client\\1.0-SNAPSHOT\\rs-client-1.0-SNAPSHOT.jar");
private static final File VANILLA = new File(InjectTest.class.getResource("/gamepack_v16.jar").getFile());
private static final File DEOBFUSCATED = new File("d:/rs/07/gamepack_v18_with_annotations.jar");
private static final File VANILLA = new File(InjectTest.class.getResource("/gamepack_v18.jar").getFile());
private static final File OUT = new File("d:/rs/07/adamout.jar");
private ClassGroup deob, vanilla;