From aafe4b1a09df7f0c94668875d38dddf2f05f5822 Mon Sep 17 00:00:00 2001 From: adinn Date: Mon, 12 Apr 2010 08:13:58 +0000 Subject: [PATCH] fixes for JASSIST-42 and JASSIST-97 git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@525 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- build.xml | 11 ------- .../javassist/util/proxy/ProxyFactory.java | 33 ++++++++++++++----- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/build.xml b/build.xml index 47060137..315c7460 100644 --- a/build.xml +++ b/build.xml @@ -104,17 +104,6 @@ - - - - - - - - - - - > 3); signature = new byte[maxBytes]; @@ -786,6 +792,19 @@ public class ProxyFactory { } } + private void installSignature(byte[] signature) // throws CannotCompileException + { + makeSortedMethodList(); + + int l = signatureMethods.size(); + int maxBytes = ((l + 7) >> 3); + if (signature.length != maxBytes) { + throw new RuntimeException("invalid filter signature length for deserialized proxy class"); + } + + this.signature = signature; + } + private boolean testBit(byte[] signature, int idx) { int byteIdx = idx >> 3; @@ -887,12 +906,10 @@ public class ProxyFactory { String key = (String)e.getKey(); Method meth = (Method)e.getValue(); int mod = meth.getModifiers(); - if (!Modifier.isFinal(mod) && !Modifier.isStatic(mod) - && isVisible(mod, packageName, meth)) - if (testBit(signature, index)) - if (methodFilter == null || methodFilter.isHandled(meth)) - override(className, meth, prefix, index, - keyToDesc(key), cf, cp); + if (testBit(signature, index)) { + override(className, meth, prefix, index, + keyToDesc(key), cf, cp); + } index++; } -- 2.39.5