bodewig 2003/07/24 07:05:55
Modified: src/main/org/apache/tools/ant Project.java
PropertyHelper.java
Log:
Fix inconsistent synchronization
Revision Changes Path
1.149 +5 -5 ant/src/main/org/apache/tools/ant/Project.java
Index: Project.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Project.java,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -r1.148 -r1.149
--- Project.java 22 Jul 2003 11:58:55 -0000 1.148
+++ Project.java 24 Jul 2003 14:05:49 -0000 1.149
@@ -452,7 +452,7 @@
* @param value The new value of the property.
* Must not be <code>null</code>.
*/
- public synchronized void setProperty(String name, String value) {
+ public void setProperty(String name, String value) {
PropertyHelper.getPropertyHelper(this).
setProperty(null, name, value, true);
}
@@ -468,7 +468,7 @@
* Must not be <code>null</code>.
* @since 1.5
*/
- public synchronized void setNewProperty(String name, String value) {
+ public void setNewProperty(String name, String value) {
PropertyHelper.getPropertyHelper(this).setNewProperty(null, name,
value);
}
@@ -482,7 +482,7 @@
* Must not be <code>null</code>.
* @see #setProperty(String,String)
*/
- public synchronized void setUserProperty(String name, String value) {
+ public void setUserProperty(String name, String value) {
PropertyHelper.getPropertyHelper(this).setUserProperty(null, name,
value);
}
@@ -499,7 +499,7 @@
* Must not be <code>null</code>.
* @see #setProperty(String,String)
*/
- public synchronized void setInheritedProperty(String name, String value)
{
+ public void setInheritedProperty(String name, String value) {
PropertyHelper ph = PropertyHelper.getPropertyHelper(this);
ph.setInheritedProperty(null, name, value);
}
1.7 +4 -3 ant/src/main/org/apache/tools/ant/PropertyHelper.java
Index: PropertyHelper.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/PropertyHelper.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- PropertyHelper.java 5 Jul 2003 14:34:11 -0000 1.6
+++ PropertyHelper.java 24 Jul 2003 14:05:49 -0000 1.7
@@ -156,7 +156,8 @@
*
* @return the project's property helper.
*/
- public static PropertyHelper getPropertyHelper(Project project) {
+ public synchronized static
+ PropertyHelper getPropertyHelper(Project project) {
PropertyHelper helper
= (PropertyHelper) project.getReference("ant.PropertyHelper");
if (helper != null) {
@@ -451,7 +452,7 @@
* @return the property value, or <code>null</code> for no match
* or if a <code>null</code> name is provided.
*/
- public Object getProperty(String ns, String name) {
+ public synchronized Object getProperty(String ns, String name) {
if (name == null) {
return null;
}
@@ -472,7 +473,7 @@
* @return the property value, or <code>null</code> for no match
* or if a <code>null</code> name is provided.
*/
- public Object getUserProperty(String ns, String name) {
+ public synchronized Object getUserProperty(String ns, String name) {
if (name == null) {
return null;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]