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=23920>.
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=23920

Contains selector test fails on JDK 1.2.2 and IBM JDK 1.4.1

           Summary: Contains selector test fails on JDK 1.2.2 and IBM JDK
                    1.4.1
           Product: Ant
           Version: 1.6Beta
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The contains selector test fails on JDK 1.2.2 and IBM JDK 1.4.1 with an
MalformedInputException,

While the testcase uses Binary files,  the ContainsSelector plainly opens the
file (also not supporting the setting of the encoding) which leads to this 
Exception

The error reported in the test output:

Testcase:
testSelectionBehaviour(org.apache.tools.ant.types.selectors.ContainsSelectorTest):
   Caused an ERROR
Could not read file asf-logo.gif.bz2
Could not read file asf-logo.gif.bz2
        at
org.apache.tools.ant.types.selectors.ContainsSelector.isSelected(ContainsSelector.java:227)
        at
org.apache.tools.ant.types.selectors.BaseSelectorTest.selectionString(BaseSelectorTest.java:176)
        at
org.apache.tools.ant.types.selectors.BaseSelectorTest.selectionString(BaseSelectorTest.java:154)
        at
org.apache.tools.ant.types.selectors.ContainsSelectorTest.testSelectionBehaviour(ContainsSelectorTest.java:126)
<truncated>

Modifying the source of the contains selector to give more infor on the received
IO exception gives:

    [junit] sun.io.MalformedInputException
    [junit]     at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java(Compiled 
Code))
    [junit]     at
sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:286)
    [junit]     at
sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:336)
    [junit]     at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:222)
    [junit]     at java.io.InputStreamReader.read(InputStreamReader.java:207)
    [junit]     at java.io.BufferedReader.fill(BufferedReader.java:152)
    [junit]     at java.io.BufferedReader.readLine(BufferedReader.java(Compiled
Code))
    [junit]     at java.io.BufferedReader.readLine(BufferedReader.java:378)
    [junit]     at
org.apache.tools.ant.types.selectors.ContainsSelector.isSelected(ContainsSelector.java:212)
    [junit]     at
org.apache.tools.ant.types.selectors.BaseSelectorTest.selectionString(BaseSelectorTest.java:176)
<truncated>

How is it meant to work?
Should the ContainsSelector work on other files than textfiles?
Shouldn't it be possible to set the encoding used in the comparison?

I am willing to look to find an solution, provided the above questions are 
answered.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to