You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2007/02/16 16:07:42 UTC

DO NOT REPLY [Bug 41642] New: - loadfile does not set property if resulting value is an empty string

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

           Summary: loadfile does not set property if resulting value is an
                    empty string
           Product: Ant
           Version: 1.6.5
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: conny.krappatsch@smiths-heimann.com


The loadfile task does not set the property if the property value evaluates to
an empty string (either because the file was empty or filterchains filtered out
everything).

Expected behaviour:
The property should be set and its value should be the empty string.

If this is not wanted for any reason, the current behaviour should be mentioned
in loadfile task documentation.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 41642] - loadfile does not set property if resulting value is an empty string

Posted by bu...@apache.org.
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=41642>.
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=41642


jan@materne.de changed:

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




------- Additional Comments From jan@materne.de  2007-03-16 04:50 -------
I had a look at that. LoadFile extends LoadResource. And there it is explicitly
programmed. So I have documented that.


LoadResource:0183:             if (text != null) {
LoadResource:0184:                 if (text.length() > 0) {
LoadResource:0185:                     getProject().setNewProperty(property, text);
LoadResource:0186:                     log("loaded " + text.length() + "
characters",
LoadResource:0187:                         Project.MSG_VERBOSE);
LoadResource:0188:                     log(property + " := " + text,
Project.MSG_DEBUG);
LoadResource:0189:                 }
LoadResource:0190:             }


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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org