#3 allow Enhancer to pick up ProtectionDomain of superclass

open
nobody
None
5
2006-07-01
2006-07-01
No

Allows to provide a Class, from which the ProtectionDomain
is taken and applied to the generated class, e.g. a
subclass.

This avoids the problem of not being able to
create/load a subclass of an existing signed class,
lifting the requirement to sign cglib itself.

Ref: Hibernate issue HHH-1365

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous

    Anonymous - 2010-07-30

    This patch solves signed jar issues (with hibernate & Spring framework). It can be applied to version 2.2. But net.sf.cglib.reflect.FastClass.Generator needs to be patched too. Add a call to 'setProtDomainSrc' in 'setType' method of inner class 'Generator' of class 'FastClass'.

    public void setType(Class type) {
    this.type = type;
    this.setProtDomainSrc(type); // new line added
    }