I thought that since it's only used to modify a local List<ServiceLocation> 
variable in ServiceEngine constructor which is then put in
private final List<ServiceLocation> serviceLocations;
of this class
using
this.serviceLocations = Collections.unmodifiableList(serviceLocations);
there were no dangers

I must say I did not consider external uses (not OOTB) of 
ServiceLocation.setLocation(). I guess there should not be.

Jacques

Le 12/09/2014 19:02, Jacopo Cappellato a écrit :
With this change you have broken the thread safety of the ServiceLocation.java 
class; where you aware of this?

Jacopo

On Oct 20, 2013, at 12:07 AM, [email protected] wrote:

Modified: 
ofbiz/trunk/framework/service/src/org/ofbiz/service/config/model/ServiceLocation.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/config/model/ServiceLocation.java?rev=1533839&r1=1533838&r2=1533839&view=diff
==============================================================================
--- 
ofbiz/trunk/framework/service/src/org/ofbiz/service/config/model/ServiceLocation.java
 (original)
+++ 
ofbiz/trunk/framework/service/src/org/ofbiz/service/config/model/ServiceLocation.java
 Sat Oct 19 22:07:35 2013
@@ -28,7 +28,7 @@ import org.w3c.dom.Element;
@ThreadSafe
public final class ServiceLocation {

-    private final String location;
+    private String location;
     private final String name;

     ServiceLocation(Element serviceLocationElement) throws 
ServiceConfigException {
@@ -48,6 +48,10 @@ public final class ServiceLocation {
         return location;
     }

+    public void setLocation(String location) {
+        this.location = location;
+    }
+
     public String getName() {
         return name;
     }



Reply via email to