Skip to content

Commit

Permalink
fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
radioegor146 committed Sep 12, 2023
1 parent 804fce5 commit 34856fa
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;

import java.util.List;

public class ClassMethodFilter {

private static final String NATIVE_ANNOTATION_DESC = Type.getDescriptor(Native.class);
Expand Down
2 changes: 0 additions & 2 deletions obfuscator/src/main/java/by/radioegor146/ClassMethodList.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package by.radioegor146;

import jdk.nashorn.internal.runtime.regexp.joni.Regex;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
Expand Down
1 change: 0 additions & 1 deletion obfuscator/src/main/java/by/radioegor146/Util.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package by.radioegor146;

import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;

import java.io.*;
import java.lang.reflect.Field;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.TryCatchBlockNode;

import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.util.*;
import java.util.stream.Collectors;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import by.radioegor146.MethodContext;
import by.radioegor146.Util;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.InsnNode;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package by.radioegor146.instructions;

import by.radioegor146.MethodContext;
import by.radioegor146.Util;
import org.objectweb.asm.tree.LabelNode;

public class LabelHandler extends GenericInstructionHandler<LabelNode> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package by.radioegor146.source;

import by.radioegor146.HiddenCppMethod;
import by.radioegor146.HiddenMethodsPool;
import by.radioegor146.NodeCache;
import by.radioegor146.Util;
import org.objectweb.asm.tree.ClassNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import org.objectweb.asm.tree.*;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class ClInitSpecialMethodProcessor implements SpecialMethodProcessor {

Expand Down
14 changes: 5 additions & 9 deletions obfuscator/src/test/java/by/radioegor146/TestsGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

public class TestsGenerator {

private final static List<String> ALLOWED_TESTS = null;
/* private final static List<String> ALLOWED_TESTS = Arrays.asList(
"InterfaceDefaultStacktrace"
); */
private final static List<String> ALLOWED_TESTS = null; /*
private final static List<String> ALLOWED_TESTS = Arrays.asList(
"StringTokenizer"
); // */

private static boolean testAllowed(Path testPath) {
//noinspection ConstantValue
Expand All @@ -44,11 +44,7 @@ public Stream<DynamicTest> generateTests() throws URISyntaxException, IOExceptio
Objects.requireNonNull(tests, "No tests dir in resources");

Path testDir = Paths.get(tests.toURI());
return Files.walk(testDir, FileVisitOption.FOLLOW_LINKS)
.filter(Files::isDirectory)
.filter(TestsGenerator::hasJavaFiles)
.filter(TestsGenerator::testAllowed)
.map(p -> DynamicTest.dynamicTest(testDir.relativize(p).toString(), new ClassicTest(p, testDir.relativize(p).toString())));
return Files.walk(testDir, FileVisitOption.FOLLOW_LINKS).filter(Files::isDirectory).filter(TestsGenerator::hasJavaFiles).filter(TestsGenerator::testAllowed).map(p -> DynamicTest.dynamicTest(testDir.relativize(p).toString(), new ClassicTest(p, testDir.relativize(p).toString())));
}

private static boolean hasJavaFiles(Path path) {
Expand Down

0 comments on commit 34856fa

Please sign in to comment.