Browse Source

Correctly handle the case where one of the defaults.properties files

cannot be found.
Submitted by:	Nico Seessle <nico@seessle.de>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267957 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 25 years ago
parent
commit
76924feb0d
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      src/main/org/apache/tools/ant/Project.java

+ 6
- 0
src/main/org/apache/tools/ant/Project.java View File

@@ -145,6 +145,9 @@ public class Project {
try {
Properties props = new Properties();
InputStream in = this.getClass().getResourceAsStream(defs);
if (in == null) {
throw new BuildException("Can't load default task list");
}
props.load(in);
in.close();

@@ -170,6 +173,9 @@ public class Project {
try{
Properties props = new Properties();
InputStream in = this.getClass().getResourceAsStream(dataDefs);
if (in == null) {
throw new BuildException("Can't load default datatype list");
}
props.load(in);
in.close();



Loading…
Cancel
Save