ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 49659] New: Project.getReference(key) no longer returns certain references
Date Wed, 28 Jul 2010 15:17:26 GMT

           Summary: Project.getReference(key) no longer returns certain
           Product: Ant
           Version: 1.8.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core

Working on updating Eclipse to use Ant 1.8.1 I found that we have numerous test
suite failures around popup /completion proposals. I tracked the problem back
to where we try to look up a path element by its id.

The following is the test build file that fails:

<project default="1">
    <path id="project.class.path">
        <pathelement location="lib/" />
        <pathelement path="${java.class.path}/" />
        <pathelement path="${additional.path}" />

    <target name="1">
        <path id="project.class.path2">
            <path refid="project.class.path" />
    <target name="compile">
        <javac srcdir="src"
           debug="on" />
    <target name= "depends" depends=" compile  , 1 ">
    <property name="name with spaces" value="value with spaces"/>
    <fileset dir="dir" id="filesetTest">
        <include name="include"/>
        <exclude name="exclude"/>
    <patternset id="patternSetTest">
            <include name="*.xml"/>
            <exclude name="**/*Test*"/>
    <patternset id="patternSetTestBad">
        <includesfile name="nothere"/>
    <echo>${name with spaces}</echo>
    <fileset refid="filesetTest">
        <patternset refid="patternSetTest"></patternset>
        <patternset refid="patternSetTestBad"></patternset>

During our tests we try to look up the element "project.class.path". In
versions < 1.8.* this worked fine, however in Ant 1.8.1 the lookup will always
result in null being returned.

I tracked the cause to Project.getReference(key), where you used to lookup the
element in the idReferences map to try and resolve it if it did not appear in
the references mapping. 

Perhaps AntRefTable.get(..) needs to also consult the idReferences cache in the
event of a miss?

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message