List Info

Thread: DO NOT REPLY New: - NullPointer in FilterMapper in conjunction with linecontains mappe




DO NOT REPLY New: - NullPointer in FilterMapper in conjunction with linecontains mappe
country flaguser name
United States
2007-10-19 10:34:56
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43
659>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43659

           Summary: NullPointer in FilterMapper in
conjunction with
                    linecontains mapper
           Product: Ant
           Version: 1.7.0
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: devant.apache.org
        ReportedBy: bruno.navertmorganstanley.com


When using a <linecontains> mapper to filter out
certain lines, FilterMapper
throws a NullPointerException on line 74:

if (result.length() == 0) {

This line should read:

if (result == null || result.length() == 0) {

This can be reproduced with the following ant tasks:

<pathconvert property="some.property"
pathsep=" " refid="some_path">
    <mapper>
        <filtermapper>
            <linecontains negate="true">
                <contains value="servlet"/>
            </linecontains>
        </filtermapper>
    </mapper>
</pathconvert>

(this construct is used to exclude certain entries from a
PATH structure, in
order to then be able to include it in a manifest's
Class-Path attribute).

With the suggested null check, the filter mapping properly
excludes the entries
as expected.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=ema
il
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeant.apache.org
For additional commands, e-mail: dev-helpant.apache.org


DO NOT REPLY - NullPointer in FilterMapper in conjunction with linecontains mapper
country flaguser name
United States
2007-10-19 11:28:12
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43
659>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43659


peterreillyapache.org changed:

           What    |Removed                     |Added
------------------------------------------------------------
----------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From peterreillyapache.org  2007-10-19 09:28 -------
Thanks for the report,
However, this problem has already been fixed.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=ema
il
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeant.apache.org
For additional commands, e-mail: dev-helpant.apache.org


DO NOT REPLY - NullPointer in FilterMapper in conjunction with linecontains mapper
country flaguser name
United States
2007-10-19 11:34:19
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43
659>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43659





------- Additional Comments From bruno.navertmorganstanley.com  2007-10-19 09:34 -------
Where should I have looked for the latest source ? I checked
the SVN repository
(http://svn.apache.org/viewvc/ant/core/trunk/src/main/or
g/apache/tools/ant/types/mappers/FilterMapper.java?view=mark
up),
and the file does not have the if null fix (unless you fixed
it some other way).
In which release is this fix targetted ?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=ema
il
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeant.apache.org
For additional commands, e-mail: dev-helpant.apache.org


DO NOT REPLY - NullPointer in FilterMapper in conjunction with linecontains mapper
country flaguser name
United States
2007-10-19 11:55:04
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43
659>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43659





------- Additional Comments From peterreillyapache.org  2007-10-19 09:55 -------
See the line 73
String result =
FileUtils.safeReadFully(helper.getAssembledReader());
this was FileUtils.readFully.

Peter


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=ema
il
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeant.apache.org
For additional commands, e-mail: dev-helpant.apache.org


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )