Hmm, maybe that's the reason why I saw mem leaks after updating to a newer javassist version?
For now I think it's good for just remaining with the old javassist version and get rid of javassist in the next OWB release completely ;) LieGrue, strub ----- Original Message ----- > From: Romain Manni-Bucau <[email protected]> > To: [email protected] > Cc: > Sent: Wednesday, August 15, 2012 4:31 PM > Subject: OWB and finalize filtering > > Hi, > > with javassist it is important to filter finalize method (it is a jira if i > remember) however i don't get the way we do it: > > if (method.getName() == FINALIZE && // Method.getName() is > defined to return .intern() in the VM spec. > method.getParameterTypes().length == 0 && > method.getReturnType() == Void.TYPE) > { > // we should NOT invoke the bean's finalize() from proxied > // finalize() method since JVM will invoke it directly. > // OWB-366 > return null; > } > > using javassist 3.15 i got weird stuff. It looked finalize() was redirected > to _d2finalize (not sure why). > > i updated locally OWB to use on the ProxyFactory (in JavassistProxyFactory): > > fact.setFilter(new MethodFilter() { // TODO if relevant: create > FinalizerMethodFilter singleton + intern usage for method name > public boolean isHandled(Method method) > { > return !(method.getName().equals("finalize") > && > method.getParameterTypes().length == 0 && > method.getReturnType() == Void.TYPE); > } > }); > > > and i didn't see the errors anymore :) > > now the question ;): any reason we are not filtering this way? > > btw i could dump bytecode before/after if needed > > - Romain >
