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 2006/08/04 07:32:01 UTC

DO NOT REPLY [Bug 40184] New: - Move stuff from Property to PropertyHelper patch

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

           Summary: Move stuff from Property to PropertyHelper patch
           Product: Ant
           Version: 1.7Alpha (nightly)
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: efanomars@yahoo.com


Why: 
  The property task currently does resolve and expand
  the properties read from a property file 
  (with <property file="..."/>) in an unsynchronised way,
  both accessing the Project and PropertyHelper interfaces.
  In a multithreaded situation this could lead to
  unexpected results. It would also be better to have all
  property handling code in the property helper.

Proposed solution:
  The handling of the properties is naturally moved from the
  Property task to the PropertyHelper. This allows easier 
  synchronisation and possibly code reuse. It also lets
  custom property helpers reimplement the exposed methods.

Stefano Marsili

-- 
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 40184] - [PATCH] Move property expansion from Property and MacroInstance to the PropertyHelper class

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


efanomars@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Move stuff from Property to |[PATCH] Move property
                   |PropertyHelper patch        |expansion from Property and
                   |                            |MacroInstance to the
                   |                            |PropertyHelper class




------- Additional Comments From efanomars@yahoo.com  2006-08-14 06:29 -------
I realised that also MacroInstance's expansion of attributes 
(macrodef task) could be moved to the PropertyHelper so that
all evaluation of expressions is centralized (and may also be
reimplemented).

Thank you
Stefano Marsili

-- 
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 40184] - [PATCH] Move property expansion from Property and MacroInstance to the PropertyHelper class

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


antoine@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|1.7Alpha (nightly)          |1.7.0Beta1




-- 
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 40184] - Move stuff from Property to PropertyHelper patch

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





------- Additional Comments From efanomars@yahoo.com  2006-08-04 05:38 -------
Created an attachment (id=18677)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18677&action=view)
Modified Property, PropertyHelper

** Sources **
PropertyHelper.java:
 - added public setNewInheritedProperty(ns, n, v)
   like setNewProperty, adds a user property only if 
   there isn't one already defined
 - added addNewProperties(ns, props, prefix)
   resolves, expands, prefixes and adds a set of properties 
 - added addNewInheritedProperties(ns, props, prefix)
   resolves, expands, prefixes and adds a set of user properties 

Property.java:
 - removed resolveAllProperties(props), now in PropertyHelper
 - modified addProperties and addProperty to call the 
   corresponding PropertyHelper methods

** Tests **
No additional testcases added.

** Note **
Modified and patched against latest 1.70alpha.

I did this patch a bit quickly. Probably everything 
(interface, comments, implementation) can be improved.
Maybe the public methods added to the PropertyHelper 
should also be added to the Project (and called from 
the Property task)?
(I also noticed that replaceProperties is not synchronized,
I'm not sure but maybe properties could be set while 
replacing, leading to inconsistent results (not in the patch).)

Stefano Marsili


-- 
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 40184] - [PATCH] Move property expansion from Property and MacroInstance to the PropertyHelper class

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


antoine@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|1.7.0RC1                    |1.7.0




-- 
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 40184] - [PATCH] Move property expansion from Property and MacroInstance to the PropertyHelper class

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


antoine@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|1.7.0Beta3                  |1.7.0RC1




-- 
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 40184] - [PATCH] Move property expansion from Property and MacroInstance to the PropertyHelper class

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


efanomars@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #18677|0                           |1
        is obsolete|                            |




------- Additional Comments From efanomars@yahoo.com  2006-08-14 06:32 -------
Created an attachment (id=18713)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18713&action=view)
Modified Property, MacroInstance and PropertyHelper

Correction, improvements, ideas are welcome.
Stefano Marsili

-- 
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 40184] - [PATCH] Move property expansion from Property and MacroInstance to the PropertyHelper class

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


antoine@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|1.7.0Beta2                  |1.7.0Beta3




-- 
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 40184] - [PATCH] Move property expansion from Property and MacroInstance to the PropertyHelper class

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


antoine@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|1.7.0Beta1                  |1.7.0Beta2




-- 
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 40184] - [PATCH] Move property expansion from Property and MacroInstance to the PropertyHelper class

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


mguillemot@yahoo.fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mguillemot@yahoo.fr




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