diff --git a/WHATSNEW b/WHATSNEW index b00a06d48..8ffa27fec 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -1,5 +1,5 @@ -Changes from Ant 1.6 to current cvs version -=========================================== +Changes from Ant 1.6.0 to current cvs version +============================================= Changes that could break older environments: -------------------------------------------- @@ -18,6 +18,9 @@ Fixed bugs: * 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. + Other changes: -------------- * Translate task logs a debug message specifying the number of files @@ -33,8 +36,8 @@ Other changes: * has a new attribute - fixlast. Bugzilla Report 23262. -Changes from Ant 1.5.4 to Ant 1.6 -================================= +Changes from Ant 1.5.4 to Ant 1.6.0 +=================================== Changes that could break older environments: -------------------------------------------- diff --git a/src/main/org/apache/tools/ant/launch/Locator.java b/src/main/org/apache/tools/ant/launch/Locator.java index ee508c44a..17dd76398 100644 --- a/src/main/org/apache/tools/ant/launch/Locator.java +++ b/src/main/org/apache/tools/ant/launch/Locator.java @@ -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 @@ public final class Locator { 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:")) {