Coverage Report - org.mule.module.boot.MuleSystemClassLoader
 
Classes in this File Line Coverage Branch Coverage Complexity
MuleSystemClassLoader
0%
0/11
0%
0/4
0
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.module.boot;
 8  
 
 9  
 import java.net.URL;
 10  
 import java.net.URLClassLoader;
 11  
 import java.util.List;
 12  
 
 13  
 import org.apache.commons.logging.Log;
 14  
 import org.apache.commons.logging.LogFactory;
 15  
 
 16  
 /**
 17  
  * Loads a standard $MULE_HOME/lib/* hierarchy.
 18  
  */
 19  
 public class MuleSystemClassLoader extends URLClassLoader
 20  
 {
 21  
 
 22  0
     protected transient Log logger = LogFactory.getLog(getClass());
 23  
 
 24  
     public MuleSystemClassLoader()
 25  
     {
 26  0
         super(new URL[0]);
 27  
         try
 28  
         {
 29  0
             DefaultMuleClassPathConfig classPath = new DefaultMuleClassPathConfig(MuleBootstrap.lookupMuleHome(),
 30  
                                                                                   MuleBootstrap.lookupMuleBase());
 31  
 
 32  0
             final List<URL> urlsList = classPath.getURLs();
 33  0
             for (URL url : urlsList)
 34  
             {
 35  0
                 addURL(url);
 36  
             }
 37  
         }
 38  0
         catch (Exception e)
 39  
         {
 40  0
             if (logger.isDebugEnabled())
 41  
             {
 42  0
                 logger.debug(e);
 43  
             }
 44  0
         }
 45  0
     }
 46  
 }