métodos de copia proguard en la interfaz

after decompiling my interface i found out that proguard duplicated my implemented method in the upper level interface that is somehow a class on its own right.

here's how my interface looks like after obfuscation (note that proguard even added the annotation from the implementation)

package com.company.project.f.a.a;


import java.util.List;
import org.apache.log4j.Logger;

@Component(value="ServiceImpl")
public class a
{

    public b a(int i)
    {
        if((i = b.a(i)) != null)
        {
            if(i.size() == 0)
            {
                a_.fatal("It is expected at least one record.");
                return null;
            } else
            {
                return (b)i.get(0);
            }
        } else
        {
            return null;
        }
    }

    public a()
    {
        a_ = Logger.getLogger(getClass());
    }

    public com.company.project.b.a.a a()
    {
        return b;
    }

    public void a(com.company.project.b.a.a a1)
    {
        b = a1;
    }

    private com.company.project.b.a.a b;
    Logger a_;
}

same issue happened with the class below (proguard transforming the interface into a class with the same component name)

@Component("testDao")
public class TestDaoImpl implements TestDao {

    @Override
    public void testing() {
        // TODO Auto-generated method stub

    }

preguntado el 03 de mayo de 12 a las 14:05

1 Respuestas

solved it : according to mr eric lafortune , the optimizer is merging interface and class . so i used

-dontoptimize

contestado el 04 de mayo de 12 a las 09:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.