@Test public void testRun() { RuntimeExceptions re = new RuntimeExceptions(); re.run(group); }
@Override public void run(ClassGroup group) { boolean foundInit = false; int i = 0; for (ClassFile cf : group.getClasses()) { for (Method m : cf.getMethods()) { Code c = m.getCode(); if (c == null) continue; if (cf.getName().equals("client") && m.getName().equals("init")) { foundInit = true; continue; } for (net.runelite.asm.attributes.code.Exception e : new ArrayList<>(c.getExceptions().getExceptions())) { if (e.getCatchType() != null && e.getCatchType().getName().equals("java/lang/RuntimeException")) { c.getExceptions().remove(e); ++i; } } } } if (!foundInit) { throw new IllegalStateException("client.init(...) method seems to be missing!"); } logger.info("Remove {} exception handlers", i); }
RuntimeExceptions implements Deobfuscator { @Override public void run(ClassGroup group) { boolean foundInit = false; int i = 0; for (ClassFile cf : group.getClasses()) { for (Method m : cf.getMethods()) { Code c = m.getCode(); if (c == null) continue; if (cf.getName().equals("client") && m.getName().equals("init")) { foundInit = true; continue; } for (net.runelite.asm.attributes.code.Exception e : new ArrayList<>(c.getExceptions().getExceptions())) { if (e.getCatchType() != null && e.getCatchType().getName().equals("java/lang/RuntimeException")) { c.getExceptions().remove(e); ++i; } } } } if (!foundInit) { throw new IllegalStateException("client.init(...) method seems to be missing!"); } logger.info("Remove {} exception handlers", i); } }
RuntimeExceptions implements Deobfuscator { @Override public void run(ClassGroup group) { boolean foundInit = false; int i = 0; for (ClassFile cf : group.getClasses()) { for (Method m : cf.getMethods()) { Code c = m.getCode(); if (c == null) continue; if (cf.getName().equals("client") && m.getName().equals("init")) { foundInit = true; continue; } for (net.runelite.asm.attributes.code.Exception e : new ArrayList<>(c.getExceptions().getExceptions())) { if (e.getCatchType() != null && e.getCatchType().getName().equals("java/lang/RuntimeException")) { c.getExceptions().remove(e); ++i; } } } } if (!foundInit) { throw new IllegalStateException("client.init(...) method seems to be missing!"); } logger.info("Remove {} exception handlers", i); }  }
RuntimeExceptions implements Deobfuscator { @Override public void run(ClassGroup group) { boolean foundInit = false; int i = 0; for (ClassFile cf : group.getClasses()) { for (Method m : cf.getMethods()) { Code c = m.getCode(); if (c == null) continue; if (cf.getName().equals("client") && m.getName().equals("init")) { foundInit = true; continue; } for (net.runelite.asm.attributes.code.Exception e : new ArrayList<>(c.getExceptions().getExceptions())) { if (e.getCatchType() != null && e.getCatchType().getName().equals("java/lang/RuntimeException")) { c.getExceptions().remove(e); ++i; } } } } if (!foundInit) { throw new IllegalStateException("client.init(...) method seems to be missing!"); } logger.info("Remove {} exception handlers", i); }  @Override void run(ClassGroup group); }
RuntimeExceptions implements Deobfuscator { @Override public void run(ClassGroup group) { boolean foundInit = false; int i = 0; for (ClassFile cf : group.getClasses()) { for (Method m : cf.getMethods()) { Code c = m.getCode(); if (c == null) continue; if (cf.getName().equals("client") && m.getName().equals("init")) { foundInit = true; continue; } for (net.runelite.asm.attributes.code.Exception e : new ArrayList<>(c.getExceptions().getExceptions())) { if (e.getCatchType() != null && e.getCatchType().getName().equals("java/lang/RuntimeException")) { c.getExceptions().remove(e); ++i; } } } } if (!foundInit) { throw new IllegalStateException("client.init(...) method seems to be missing!"); } logger.info("Remove {} exception handlers", i); }  @Override void run(ClassGroup group);  }