Bug 45706 - Transform.register class loading and recursive instantiation problems
Transform.register class loading and recursive instantiation problems
Status: RESOLVED FIXED
Product: Security - Now in JIRA
Classification: Unclassified
Component: Signature
unspecified
All All
: P2 normal
: ---
Assigned To: XML Security Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-08-28 06:07 UTC by sean.mullan
Modified: 2008-08-28 06:30 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sean.mullan 2008-08-28 06:07:54 UTC
There are a couple of problems with org.apache.xml.security.transforms.Transform.register.

The first is that it doesn't use the current thread's context class loader to load the class to be registered, which causes ClassNotFound exceptions if the class can't be loaded by the system ClassLoader.

The second problem is a recursive stack overflow issue. If a custom Transform
implementation calls Transform.register in its constructor, then Transform.register will try to instantiate the Transform, and so forth ...

I have a fix and test case ready to be putback.