From 79d1102c453fe7eb9d18b02a80ddcae020c59d22 Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Wed, 10 Jan 2001 21:37:42 +0000 Subject: [PATCH] Restore the default to "last". Add a warning message if an invalid value is specified. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268426 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/types/Path.java | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/main/org/apache/tools/ant/types/Path.java b/src/main/org/apache/tools/ant/types/Path.java index d435f76ed..f9a27a4c3 100644 --- a/src/main/org/apache/tools/ant/types/Path.java +++ b/src/main/org/apache/tools/ant/types/Path.java @@ -475,26 +475,32 @@ public class Path extends DataType implements Cloneable { Path result = new Path(project); String order = project.getProperty("build.sysclasspath"); - if (order == null) order="first"; + if (order == null) order="last"; if (order.equals("only")) { // only: the developer knows what (s)he is doing result.addExisting(Path.systemClasspath); - } else if (order.equals("last")) { - // last: don't trust the developer - result.addExisting(this); + } else if (order.equals("first")) { + // first: developer could use a little help result.addExisting(Path.systemClasspath); - + result.addExisting(this); + } else if (order.equals("ignore")) { // ignore: don't trust anyone result.addExisting(this); - + } else { - // first: developer could use a little help - result.addExisting(Path.systemClasspath); + // last: don't trust the developer + if (!order.equals("last")) { + project.log("invalid value for build.sysclasspath: " + order, + Project.MSG_WARN); + } + result.addExisting(this); + result.addExisting(Path.systemClasspath); } + return result;