Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.3.1
-
None
-
None
-
Unknown
Description
In TopologyManagerImport.importServices we seem to check if we already imported an endpoint. (See snippet below).
private void importServices(String filter) {
List<ImportRegistration> importRegistrations = getImportedServices(filter);
for (EndpointDescription epd : importPossibilities.get(filter)) {
if (!importRegistrations.contains(epd)) {
I have two concerns with this:
1. importRegistrations is a List<ImportRegistration> but we check using contains(epd) which is an EndpointDescription. I think this can never return true.
I have prepared a code that can fix this:
private boolean alreadyImported(EndpointDescription epd, List<ImportRegistration> importRegistrations) {
for (ImportRegistration ir : importRegistrations) {
if (epd.equals(ir.getImportReference().getImportedEndpoint()))
}
return false;
}
As soon as I fix it though the second concern below may be an issue.
2. We only have one list of ImportRegistrations. In case a RemoteServiceAdmin is added this means that we would not add it to this new RemoteServiceAdmin. So the question here is: Do we want to import each service with each RSA or only with one?
So any ideas how to proceed here?