Community

Create a proxy of proxy

reply from Bozhidar Bozhanov in Javassist - View the full discussion

The problem was (actually, it's the same with  CGLIB - I tried it using commons-proxy) that I should not try to create a  proxy class of the proxy class. The second proxy should again be of the  original class. So adding the following line resolves the problem:

if (instance instanceof ProxyObject) {
    originalClass = originalClass.getSuperclass();
}

Reply to this message by going to Community

Start a new discussion in Javassist at Community