notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
r1746 - trunk/main/transit/core/src/main/net/dpml/lang
- From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
- To: notify-dpml AT lists.ibiblio.org
- Subject: r1746 - trunk/main/transit/core/src/main/net/dpml/lang
- Date: Tue, 12 Sep 2006 18:44:49 +0200
Author: mcconnell
Date: 2006-09-12 18:44:48 +0200 (Tue, 12 Sep 2006)
New Revision: 1746
Modified:
trunk/main/transit/core/src/main/net/dpml/lang/StandardClassLoader.java
Log:
Resolve minor bug in multi-classloader debug scenario.
This is a pure implementation change.
Modified:
trunk/main/transit/core/src/main/net/dpml/lang/StandardClassLoader.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/lang/StandardClassLoader.java
2006-09-12 16:33:00 UTC (rev 1745)
+++ trunk/main/transit/core/src/main/net/dpml/lang/StandardClassLoader.java
2006-09-12 16:44:48 UTC (rev 1746)
@@ -376,22 +376,28 @@
private static ClassLoader[] getClassLoaderChain( ClassLoader
classloader )
{
- ArrayList list = new ArrayList();
- list.add( classloader );
- ClassLoader parent = classloader.getParent();
- while( null != parent )
+ if( null == classloader )
{
- list.add( parent );
- parent = parent.getParent();
+ return new ClassLoader[0];
}
- ArrayList result = new ArrayList();
- int n = list.size() - 1;
- for( int i=n; i>-1; i-- )
+ else
{
- result.add( list.get( i ) );
+ ArrayList list = new ArrayList();
+ list.add( classloader );
+ ClassLoader parent = classloader.getParent();
+ while( null != parent )
+ {
+ list.add( parent );
+ parent = parent.getParent();
+ }
+ ArrayList result = new ArrayList();
+ int n = list.size() - 1;
+ for( int i=n; i>-1; i-- )
+ {
+ result.add( list.get( i ) );
+ }
+ return (ClassLoader[]) result.toArray( new ClassLoader[0] );
}
-
- return (ClassLoader[]) result.toArray( new ClassLoader[0] );
}
private static ClassLoader getCommonClassLoader( ClassLoader[] primary,
ClassLoader[] secondary )
- r1746 - trunk/main/transit/core/src/main/net/dpml/lang, mcconnell at BerliOS, 09/12/2006
Archive powered by MHonArc 2.6.24.