ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/aut/src/java/org/apache/aut/vfs/provider DefaultURLStreamHandler.java
Date Fri, 05 Jul 2002 03:43:13 GMT
donaldp     2002/07/04 20:43:13

  Modified:    aut/src/java/org/apache/aut/vfs/provider
                        DefaultURLStreamHandler.java
  Log:
  Avoid null pointer
  
  Revision  Changes    Path
  1.3       +6 -4      jakarta-ant-myrmidon/aut/src/java/org/apache/aut/vfs/provider/DefaultURLStreamHandler.java
  
  Index: DefaultURLStreamHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/vfs/provider/DefaultURLStreamHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultURLStreamHandler.java	5 Jul 2002 03:21:54 -0000	1.2
  +++ DefaultURLStreamHandler.java	5 Jul 2002 03:43:13 -0000	1.3
  @@ -50,15 +50,17 @@
       {
           try
           {
  -            FileObject old = null;
  -            if( u.getProtocol() != null )
  -                old = m_context.resolveFile( u.toExternalForm() );
  +            FileObject old = m_context.resolveFile( u.toExternalForm() );
   
               FileObject newURL = null;
               if( start > 0 && spec.charAt( start - 1 ) == ':' )
  +            {
                   newURL = m_context.resolveFile( old, spec );
  +            }
               else
  +            {
                   newURL = old.resolveFile( spec );
  +            }
   
               final String url = newURL.getName().getURI();
               final StringBuffer filePart = new StringBuffer();
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message