From c5c26543a4866368cef6895f0e7cc3171d24d77f Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Tue, 23 Aug 2005 14:19:08 +0000 Subject: [PATCH] bug #36171; -noclasspath crashes ant if no system classpath is set. submitted by Benjamin Burgess git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@278540 13f79535-47bb-0310-9956-ffa450edef68 --- CONTRIBUTORS | 1 + WHATSNEW | 3 +++ contributors.xml | 6 +++++- src/main/org/apache/tools/ant/launch/Launcher.java | 3 +-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 40301ae15..e7e35b303 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -14,6 +14,7 @@ Aslak Helles�y Atsuhiko Yamanaka Avik Sengupta Balazs Fejes 2 +Benjamin Burgess Ben Galbraith Benoit Moussaud Brad Clark diff --git a/WHATSNEW b/WHATSNEW index 5ac898749..56dcca578 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -132,6 +132,9 @@ Fixed bugs: * off-by-one error in environment setup for execution under OpenVMS fixed. +* Bugzilla report 36171: -noclasspath crashes ant if no system classpath is set. + + Other changes: -------------- diff --git a/contributors.xml b/contributors.xml index 9c0776872..cd2921ce8 100644 --- a/contributors.xml +++ b/contributors.xml @@ -72,7 +72,11 @@ Balazs Fejes 2 - + + Benjamin + Burgess + + Ben Galbraith diff --git a/src/main/org/apache/tools/ant/launch/Launcher.java b/src/main/org/apache/tools/ant/launch/Launcher.java index d53905849..4009e0c11 100644 --- a/src/main/org/apache/tools/ant/launch/Launcher.java +++ b/src/main/org/apache/tools/ant/launch/Launcher.java @@ -186,8 +186,7 @@ public class Launcher { //decide whether to copy the existing arg set, or //build a new one from the list of all args excluding the special //operations that only we handle - - if (libPaths.size() == 0 && cpString == null) { + if (argList.size() == args.length) { newArgs = args; } else { newArgs = (String[]) argList.toArray(new String[argList.size()]);