ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 15469] New: - Use of custom DataType outputs "Overriding previous definition of reference" warning
Date Wed, 18 Dec 2002 01:25:31 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15469>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15469

Use of custom DataType outputs "Overriding previous definition of reference" warning

           Summary: Use of custom DataType outputs "Overriding previous
                    definition of reference" warning
           Product: Ant
           Version: 1.5.1
          Platform: All
               URL: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5161
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: dlr@apache.org


Observed behavior:

Use of a custom DataType with a build target outputs "Overriding previous
definition of reference $refid" warning message.  The warning _appears_ to be
harmless, but is bound to freak out my users.

The warning is triggered when actually executing the target which uses the
custom DataType when Ant calls Project's addReference(String, Object) method. 
I'm assuming that UnknownElement was previously registered with the Project as a
Reference to my custom DataType, perhaps by when ProjectHelperImpl it initially
parsed the build.xml file.


Expected behavior:

Reference will be set without printing warning erroneous message.


Steps to reproduce using Ant 1.5.1:

1. Define a custom DataType extension using TypeDef (and of course the Java code
needed to implement said class).

2. Use this custom DataType within any build target.

3. Invoke the build target (using the default logger), and watch as a warning
message is output on stdout.


Possible work around:

Use Project's getReferences() instance method, which returns a handle to
Project's private "references" instance field, to avoid calling addReference()
after a custom DataType has already been registered with a Project instance.


At a high level, this issue appears similar to the following issue against Ant
1.4.1 from last year:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5161

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message