ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/launch Locator.java
Date Mon, 12 Jan 2004 10:30:25 GMT
bodewig     2004/01/12 02:30:25

  Modified:    .        Tag: ANT_16_BRANCH WHATSNEW
               src/main/org/apache/tools/ant/launch Tag: ANT_16_BRANCH
                        Locator.java
  Log:
  Merge from HEAD
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.503.2.23 +3 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.503.2.22
  retrieving revision 1.503.2.23
  diff -u -r1.503.2.22 -r1.503.2.23
  --- WHATSNEW	12 Jan 2004 10:21:08 -0000	1.503.2.22
  +++ WHATSNEW	12 Jan 2004 10:30:24 -0000	1.503.2.23
  @@ -10,6 +10,9 @@
   
   * <whichresource> failed to load classes correctly.
   
  +* Ant could fail to start with a NullPointerException if
  +  ANT_HOME/lib/ant-launcher.jar was part of the system CLASSPATH.
  +
   Changes from Ant 1.6.B3 to Ant 1.6.0
   ====================================
   
  
  
  
  No                   revision
  No                   revision
  1.6.2.1   +7 -2      ant/src/main/org/apache/tools/ant/launch/Locator.java
  
  Index: Locator.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/launch/Locator.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- Locator.java	12 Sep 2003 20:56:46 -0000	1.6
  +++ Locator.java	12 Jan 2004 10:30:25 -0000	1.6.2.1
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2003 The Apache Software Foundation.  All rights
  + * Copyright (c) 2003-2004 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -105,7 +105,12 @@
               c = Locator.class.getClassLoader();
           }
   
  -        URL url = c.getResource(resource);
  +        URL url = null;
  +        if (c == null) {
  +            url = ClassLoader.getSystemResource(resource);
  +        } else {
  +            url = c.getResource(resource);
  +        }
           if (url != null) {
               String u = url.toString();
               if (u.startsWith("jar:file:")) {
  
  
  

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


Mime
View raw message