--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java Tue Jul 28 14:30:52 2009 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java Tue Jul 28 15:06:01 2009 -0500
@@ -297,14 +297,14 @@
}
public Collection<IConnectionType> getConnectionTypes() {
- return connectionTypeIdMap.values();
+ return new ArrayList<IConnectionType>(connectionTypeIdMap.values());
}
public Collection<IService> getCompatibleServices(IConnectionType connectionType) {
Check.checkContract(connectionTypeToServices != null);
Collection<IService> services = connectionTypeToServices.get(connectionType);
if (services != null)
- return services;
+ return new ArrayList<IService>(services);
return Collections.EMPTY_LIST;
}
@@ -403,11 +403,11 @@
* @see com.nokia.carbide.remoteconnections.registry.IConnectionStore#getConnections()
*/
public Collection<IConnection> getConnections() {
- return connectionToConnectedServices.keySet();
+ return new ArrayList<IConnection>(connectionToConnectedServices.keySet());
}
public Collection<IConnectedService> getConnectedServices(IConnection connection) {
- return connectionToConnectedServices.get(connection);
+ return new ArrayList<IConnectedService>(connectionToConnectedServices.get(connection));
}
private File getConnectionStorageFile() {
@@ -439,7 +439,7 @@
}
public Collection<IService> getServices() {
- return services;
+ return new ArrayList<IService>(services);
}
public IService findServiceByID(String id) {