Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c93a942 authored by Diego Perez's avatar Diego Perez
Browse files

Remove deprecated overriden methods in CreateInfo

Change-Id: Ie0b669b188086af2d6fef8f7b7d170dadb422bdb
parent 686bcc52
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.ListIterator;
@@ -48,8 +49,6 @@ public class AsmGenerator {
    private final String mOsDestJar;
    /** List of classes to inject in the final JAR from _this_ archive. */
    private final Class<?>[] mInjectClasses;
    /** The set of methods to stub out. */
    private final Set<String> mStubMethods;
    /** All classes to output as-is, except if they have native methods. */
    private Map<String, ClassReader> mKeep;
    /** All dependencies that must be completely stubbed. */
@@ -107,7 +106,6 @@ public class AsmGenerator {
            }
        }
        mInjectClasses = injectedClasses.toArray(new Class<?>[0]);
        mStubMethods = new HashSet<>(Arrays.asList(createInfo.getOverriddenMethods()));

        // Create the map/set of methods to change to delegates
        mDelegateMethods = new HashMap<>();
@@ -384,7 +382,7 @@ public class AsmGenerator {
        if (mInjectedMethodsMap.keySet().contains(binaryNewName)) {
            cv = new InjectMethodsAdapter(cv, mInjectedMethodsMap.get(binaryNewName));
        }
        cv = new TransformClassAdapter(mLog, mStubMethods, mDeleteReturns.get(className),
        cv = new TransformClassAdapter(mLog, Collections.emptySet(), mDeleteReturns.get(className),
                newName, cv, stubNativesOnly);

        Set<String> delegateMethods = mDelegateMethods.get(className);
+0 −20
Original line number Diff line number Diff line
@@ -63,18 +63,6 @@ public final class CreateInfo implements ICreateInfo {
        return DELEGATE_CLASS_NATIVES;
    }

    /**
     * Returns The list of methods to stub out. Each entry must be in the form
     * "package.package.OuterClass$InnerClass#MethodName".
     * The list can be empty but must not be null.
     * <p/>
     * This usage is deprecated. Please use method 'delegates' instead.
     */
    @Override
    public String[] getOverriddenMethods() {
        return OVERRIDDEN_METHODS;
    }

    /**
     * Returns the list of classes to rename, must be an even list: the binary FQCN
     * of class to replace followed by the new FQCN.
@@ -308,14 +296,6 @@ public final class CreateInfo implements ICreateInfo {
        "libcore.icu.ICU",
    };

    /**
     * The list of methods to stub out. Each entry must be in the form
     *  "package.package.OuterClass$InnerClass#MethodName".
     *  This usage is deprecated. Please use method 'delegates' instead.
     */
    private final static String[] OVERRIDDEN_METHODS = new String[] {
    };

    /**
     *  The list of classes to rename, must be an even list: the binary FQCN
     *  of class to replace followed by the new FQCN.
+0 −7
Original line number Diff line number Diff line
@@ -44,13 +44,6 @@ public interface ICreateInfo {
     */
    String[] getDelegateClassNatives();

    /**
     * Returns The list of methods to stub out. Each entry must be in the form
     * "package.package.OuterClass$InnerClass#MethodName".
     * The list can be empty but must not be null.
     */
    String[] getOverriddenMethods();

    /**
     * Returns the list of classes to rename, must be an even list: the binary FQCN
     * of class to replace followed by the new FQCN.
+0 −24
Original line number Diff line number Diff line
@@ -106,12 +106,6 @@ public class AsmGeneratorTest {
                return EMPTY_STRING_ARRAY;
            }

            @Override
            public String[] getOverriddenMethods() {
                // methods to force override
                return EMPTY_STRING_ARRAY;
            }

            @Override
            public String[] getRenamedClasses() {
                // classes to rename (so that we can replace them)
@@ -186,12 +180,6 @@ public class AsmGeneratorTest {
                return EMPTY_STRING_ARRAY;
            }

            @Override
            public String[] getOverriddenMethods() {
                // methods to force override
                return EMPTY_STRING_ARRAY;
            }

            @Override
            public String[] getRenamedClasses() {
                // classes to rename (so that we can replace them)
@@ -273,12 +261,6 @@ public class AsmGeneratorTest {
                return EMPTY_STRING_ARRAY;
            }

            @Override
            public String[] getOverriddenMethods() {
                // methods to force override
                return EMPTY_STRING_ARRAY;
            }

            @Override
            public String[] getRenamedClasses() {
                // classes to rename (so that we can replace them)
@@ -359,12 +341,6 @@ public class AsmGeneratorTest {
                return EMPTY_STRING_ARRAY;
            }

            @Override
            public String[] getOverriddenMethods() {
                // methods to force override
                return EMPTY_STRING_ARRAY;
            }

            @Override
            public String[] getRenamedClasses() {
                // classes to rename (so that we can replace them)