Browse Source

only warn if override changes the value of a reference.

PR: 5161


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

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

@@ -1639,7 +1639,12 @@ public class Project {
* @param value The value of the reference. Must not be <code>null</code>.
*/
public void addReference(String name, Object value) {
if (null != references.get(name)) {
Object old = references.get(name);
if (old == value) {
// no warning, this is not changing anything
return;
}
if (old != null) {
log("Overriding previous definition of reference to " + name,
MSG_WARN);
}


Loading…
Cancel
Save