From: adinn Date: Mon, 12 Apr 2010 08:13:58 +0000 (+0000) Subject: fixes for JASSIST-42 and JASSIST-97 X-Git-Tag: rel_3_17_1_ga~125 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=aafe4b1a09df7f0c94668875d38dddf2f05f5822;p=javassist.git fixes for JASSIST-42 and JASSIST-97 git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@525 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- 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++; }