ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48715] New: FileMatch throws NPE when file2 is smaller than file1 doing text comparison
Date Tue, 09 Feb 2010 21:28:26 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=48715

           Summary: FileMatch throws NPE when file2 is smaller than file1
                    doing text comparison
           Product: Ant
           Version: 1.8.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: rama.pulavarthi@sun.com


Usage:
<condition property="files_equal">
    <filesmatch file1="${file1}" file2="${file2}" textfile="true"/>
</condition>

Testcase is attached.

Here is the stack trace
java.lang.NullPointerException
    at java.lang.String.compareTo(String.java:998)
    at
org.apache.tools.ant.util.ResourceUtils.textCompare(ResourceUtils.java:669)
    at
org.apache.tools.ant.util.ResourceUtils.compareContent(ResourceUtils.java:592)
    at
org.apache.tools.ant.util.ResourceUtils.contentEquals(ResourceUtils.java:556)
    at org.apache.tools.ant.util.FileUtils.contentEquals(FileUtils.java:969)
    at
org.apache.tools.ant.taskdefs.condition.FilesMatch.eval(FilesMatch.java:92)
    at
org.apache.tools.ant.taskdefs.ConditionTask.execute(ConditionTask.java:120)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:592)
    at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:592)
    at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:390)
    at org.apache.tools.ant.Target.performTasks(Target.java:411)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1329)
    at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
    at org.apache.tools.ant.Main.runBuild(Main.java:801)
    at org.apache.tools.ant.Main.startAnt(Main.java:218)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 0 seconds

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message