Browse Source

remove deprecated code

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@410014 13f79535-47bb-0310-9956-ffa450edef68
master
Kevin Jackson 19 years ago
parent
commit
41c79eb325
1 changed files with 2 additions and 6 deletions
  1. +2
    -6
      src/main/org/apache/tools/ant/taskdefs/BuildNumber.java

+ 2
- 6
src/main/org/apache/tools/ant/taskdefs/BuildNumber.java View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2005 The Apache Software Foundation
* Copyright 2002-2006 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -129,7 +129,6 @@ public class BuildNumber
} catch (final NumberFormatException nfe) {
final String message =
myFile + " contains a non integer build number: " + buildNumber;

throw new BuildException(message, nfe);
}
}
@@ -173,7 +172,7 @@ public class BuildNumber
private void validate()
throws BuildException {
if (null == myFile) {
myFile = getProject().resolveFile(DEFAULT_FILENAME);
myFile = FILE_UTILS.resolveFile(getProject().getBaseDir(), DEFAULT_FILENAME);
}

if (!myFile.exists()) {
@@ -182,20 +181,17 @@ public class BuildNumber
} catch (final IOException ioe) {
final String message =
myFile + " doesn't exist and new file can't be created.";

throw new BuildException(message, ioe);
}
}

if (!myFile.canRead()) {
final String message = "Unable to read from " + myFile + ".";

throw new BuildException(message);
}

if (!myFile.canWrite()) {
final String message = "Unable to write to " + myFile + ".";

throw new BuildException(message);
}
}


Loading…
Cancel
Save