ruper2/src/java/core/org/krysalis/ruper/util ClassLoaderHelper.java,1.1,1.2

[email protected]
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/util
In directory sc8-pr-cvs1:/tmp/cvs-serv15777/src/java/core/org/krysalis/ruper/util

Modified Files:
	ClassLoaderHelper.java 
Log Message:
Tweaks

Index: ClassLoaderHelper.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/util/ClassLoaderHelper.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ClassLoaderHelper.java	2 Sep 2003 20:43:38 -0000	1.1
--- ClassLoaderHelper.java	11 Sep 2003 17:26:07 -0000	1.2
***************
*** 10,44 ****
   * @author anou_mana
   */
! public class ClassLoaderHelper
! {
  	public static Class getClassForName(String name)
! 		throws ClassNotFoundException, NoClassDefFoundError
! 	{
  		Class clazz = null;
  
! 		try
! 		{
  			Logger.getLog().info("Using the Context ClassLoader");
  			ClassLoader ccl = Thread.currentThread().getContextClassLoader();
! 			
  			clazz = Class.forName(name, true, ccl);
  		}
! 		catch (Exception e)
! 		{
! 			Logger.getLog().warn("Failed to load the class with context class loader " + e);
  		}
  
! 		if (null == clazz)
! 		{
  			ClassLoader scl = ClassLoader.getSystemClassLoader();
  
! 			try
! 			{
  				Logger.getLog().info("Using the System ClassLoader");
  				clazz = Class.forName(name, true, scl);
  			}
! 			catch (Exception e)
! 			{
! 				Logger.getLog().warn("Failed to load the class with system class loader " + e);
  			}
  		}
--- 10,39 ----
   * @author anou_mana
   */
! public class ClassLoaderHelper {
  	public static Class getClassForName(String name)
! 		throws ClassNotFoundException, NoClassDefFoundError {
  		Class clazz = null;
  
! 		try {
  			Logger.getLog().info("Using the Context ClassLoader");
  			ClassLoader ccl = Thread.currentThread().getContextClassLoader();
! 
  			clazz = Class.forName(name, true, ccl);
  		}
! 		catch (Exception e) {
! 			Logger.getLog().warn(
! 				"Failed to load the class with context class loader " + e);
  		}
  
! 		if (null == clazz) {
  			ClassLoader scl = ClassLoader.getSystemClassLoader();
  
! 			try {
  				Logger.getLog().info("Using the System ClassLoader");
  				clazz = Class.forName(name, true, scl);
  			}
! 			catch (Exception e) {
! 				Logger.getLog().warn(
! 					"Failed to load the class with system class loader " + e);
  			}
  		}
***************
*** 46,49 ****
  		return clazz;
  	}
!   
  }
--- 41,44 ----
  		return clazz;
  	}
! 
  }




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.