Bug 45706 - Transform.register class loading and recursive instantiation problems
Summary: Transform.register class loading and recursive instantiation problems
Status: RESOLVED FIXED
Alias: None
Product: Security - Now in JIRA
Classification: Unclassified
Component: Signature (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: XML Security Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
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.