Coverage Report - org.mule.util.FilenameUtils
 
Classes in this File Line Coverage Branch Coverage Complexity
FilenameUtils
0%
0/13
0%
0/8
3.5
 
 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.util;
 8  
 
 9  
 import java.io.File;
 10  
 
 11  
 public class FilenameUtils extends org.apache.commons.io.FilenameUtils
 12  
 {
 13  
     public static File fileWithPathComponents(String[] pathComponents)
 14  
     {
 15  0
         if (pathComponents == null)
 16  
         {
 17  0
             return null;
 18  
         }
 19  
         
 20  0
         StringBuffer buf = new StringBuffer(64);
 21  0
         for (int i = 0; i < pathComponents.length; i++)
 22  
         {
 23  0
             String component = pathComponents[i];
 24  0
             if (component == null)
 25  
             {
 26  0
                 continue;
 27  
             }
 28  
             
 29  0
             buf.append(component);
 30  0
             if (i < pathComponents.length - 1)
 31  
             {
 32  0
                 buf.append(File.separator);
 33  
             }
 34  
         }
 35  0
         return FileUtils.newFile(buf.toString());
 36  
     }
 37  
     
 38  
     /**
 39  
      * Never create instances of this class.
 40  
      */
 41  
     private FilenameUtils()
 42  
     {
 43  0
         super();
 44  0
     }
 45  
 }
 46  
 
 47