Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321611

Summary: Potential infinite loop in SDODataFactoryDelegate in some ClassLoader architectures
Product: z_Archived Reporter: Blaise Doughan <blaise.doughan>
Component: EclipselinkAssignee: Blaise Doughan <blaise.doughan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipselink.sdo-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
SDO - Fix none

Description Blaise Doughan CLA 2010-08-03 11:11:40 EDT
The following code in SDODataFactoryDelegate can cause an infinte loop in cases where aClassLoader == aClassLoader.getParent().


        // check the hierarchy to see if the interface loader is a parent of the context loader
        while (null != parentLoader && !loadersAreRelated) {
            if (parentLoader == interfaceLoader) {
                loadersAreRelated = true;
            }
            parentLoader = contextLoader.getParent();
        }
Comment 1 Blaise Doughan CLA 2010-08-03 11:14:48 EDT
Created attachment 175786 [details]
SDO - Fix
Comment 2 Blaise Doughan CLA 2010-08-03 13:21:49 EDT
Now check to see if the parent class loader is null or the same as the current class loader.

Fixed checked into 2.1.1 at rev:  7964
Fixed checked into trunk at rev:  7965

Code reviewed by David McCann
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:10:54 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink