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 7482] New: - PatternSet.setIncludes() does not SET includes, but appends them to a list
Date Tue, 26 Mar 2002 12:28:33 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=7482>.
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=7482

PatternSet.setIncludes() does not SET includes, but appends them to a list

           Summary: PatternSet.setIncludes() does not SET includes, but
                    appends them to a list
           Product: Ant
           Version: 1.4.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: stephan@wanderinghorse.net


It appears that PatternSet.setIncludes() does not actualy set the pattern, 
but appends it to the list of patterns. This means the classes using Zip
and Jar, for example, cannot re-use their Jar or Zip objects if they plan on
doing something in a loop like this:
// start loop:
jar.setIncludes(...);
jar.setExcludes(...);
jar.setJarfile( new java.io.File("somefile.jar" ) );
jar.execute();
// end loop

This makes extending Jar and Zip very difficult, even using delegation, since
all attributes appropriate to the object have to be re-set on a new copy of 
the Jar/Zip object on each run through the loop.
:/
This problem came up when i added multiple-pattern support to the Jar class
for handling multiple jars with one task.

--
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