Coverage Report - org.mule.transport.file.FileEndpointURIBuilder
 
Classes in this File Line Coverage Branch Coverage Complexity
FileEndpointURIBuilder
0%
0/8
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.transport.file;
 8  
 
 9  
 import org.mule.api.endpoint.MalformedEndpointException;
 10  
 import org.mule.endpoint.AbstractEndpointURIBuilder;
 11  
 
 12  
 import java.net.URI;
 13  
 import java.util.Properties;
 14  
 
 15  
 /**
 16  
  * <code>FileEndpointBuilder</code> File uris need some special processing because
 17  
  * the uri path can be any length, and the default resolver relies on a particular
 18  
  * path format.
 19  
  */
 20  
 
 21  0
 public class FileEndpointURIBuilder extends AbstractEndpointURIBuilder
 22  
 {
 23  
     @Override
 24  
     protected void setEndpoint(URI uri, Properties props) throws MalformedEndpointException
 25  
     {
 26  0
         address = uri.getSchemeSpecificPart();
 27  0
         if (address.startsWith("//"))
 28  
         {
 29  0
             address = address.substring(2);
 30  
         }
 31  
 
 32  0
         int i = address.indexOf("?");
 33  0
         if (i > -1)
 34  
         {
 35  0
             address = address.substring(0, i);
 36  
         }
 37  0
     }
 38  
 }