Browse Source

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
master
Sam Ruby 24 years ago
parent
commit
79d1102c45
1 changed files with 14 additions and 8 deletions
  1. +14
    -8
      src/main/org/apache/tools/ant/types/Path.java

+ 14
- 8
src/main/org/apache/tools/ant/types/Path.java View File

@@ -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;



Loading…
Cancel
Save