/[classpath]/classpath/java/net/URLStreamHandler.java
ViewVC logotype

Diff of /classpath/java/net/URLStreamHandler.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.31 by mkoch, Fri Oct 15 10:04:52 2004 UTC revision 1.32 by jfrijters, Mon Nov 8 09:41:26 2004 UTC
# Line 214  public abstract class URLStreamHandler Line 214  public abstract class URLStreamHandler
214            file = (file.substring(0, lastSlash)            file = (file.substring(0, lastSlash)
215                    + '/' + spec.substring(start, end));                    + '/' + spec.substring(start, end));
216    
217          if (url.getProtocol().equals("file"))          // For URLs constructed relative to a context, we
218            {          // need to canonicalise the file path.
219              // For "file" URLs constructed relative to a context, we          file = canonicalizeFilename(file);
             // need to canonicalise the file path.  
             try  
               {  
                 boolean endsWithSlash = file.charAt(file.length() - 1) == '/';  
                 file = new File(file).getCanonicalPath();  
                 file = file.replace(separator, '/');  
                 if (endsWithSlash && file.charAt(file.length() - 1) != '/')  
                   file += '/';  
               }  
             catch (IOException e)  
               {  
                 // Do nothing.  
               }  
           }  
220    
221          ref = null;          ref = null;
222        }        }

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26