diff options
4 files changed, 7 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/EndpointMatcher.java b/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/EndpointMatcher.java index b393960fd6..f978ba658d 100644 --- a/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/EndpointMatcher.java +++ b/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/EndpointMatcher.java @@ -145,8 +145,10 @@ public class EndpointMatcher { public synchronized void added(EndpointDescription endpointDescription, String matchedFilter) { if (endpointDescriptions.putValue(matchedFilter, endpointDescription)) { Collection<ListenerInfo> listenerInfos = listeners.get(matchedFilter); - for (ListenerInfo listener : listenerInfos) { - importEndpoint(listener, endpointDescription); + if (listenerInfos != null) { + for (ListenerInfo listener : listenerInfos) { + importEndpoint(listener, endpointDescription); + } } } } diff --git a/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/RemoteServiceAdminImpl.java b/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/RemoteServiceAdminImpl.java index bcda806165..63b25322e5 100644 --- a/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/RemoteServiceAdminImpl.java +++ b/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/remoteserviceadmin/impl/RemoteServiceAdminImpl.java @@ -259,7 +259,7 @@ public class RemoteServiceAdminImpl implements RemoteServiceAdmin, ManagedServic props.put("endpoint.id", ep.getId()); props.put("objectClass", ep.getInterfaces()); props.put("service.imported.configs", ep.getConfigurationTypes()); - props.put("timestamp", new Long(System.currentTimeMillis())); + props.put("timestamp", Long.valueOf(System.currentTimeMillis())); Object bindings = ep.getProperties().get("org.osgi.sca.bindings"); if (bindings != null) { props.put("org.osgi.sca.bindings", bindings); diff --git a/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/LocalDiscoveryService.java b/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/LocalDiscoveryService.java index a31d05acf0..89fd9ab853 100644 --- a/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/LocalDiscoveryService.java +++ b/sca-java-2.x/trunk/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/discovery/impl/LocalDiscoveryService.java @@ -90,7 +90,7 @@ public class LocalDiscoveryService extends AbstractDiscoveryService implements B Map<String, Object> props = new HashMap<String, Object>(sd.getProperties()); props.put(Constants.OBJECTCLASS, sd.getInterfaces().toArray(new String[sd.getInterfaces().size()])); if (!props.containsKey(ENDPOINT_SERVICE_ID)) { - props.put(ENDPOINT_SERVICE_ID, new Long(System.currentTimeMillis())); + props.put(ENDPOINT_SERVICE_ID, Long.valueOf(System.currentTimeMillis())); } if (!props.containsKey(ENDPOINT_FRAMEWORK_UUID)) { props.put(ENDPOINT_FRAMEWORK_UUID, OSGiHelper.getFrameworkUUID(context)); diff --git a/sca-java-2.x/trunk/modules/node-impl-osgi/src/test/java/calculator/dosgi/test/OSGiTestBundles.java b/sca-java-2.x/trunk/modules/node-impl-osgi/src/test/java/calculator/dosgi/test/OSGiTestBundles.java index 619dcaa07d..bdb484e6bb 100644 --- a/sca-java-2.x/trunk/modules/node-impl-osgi/src/test/java/calculator/dosgi/test/OSGiTestBundles.java +++ b/sca-java-2.x/trunk/modules/node-impl-osgi/src/test/java/calculator/dosgi/test/OSGiTestBundles.java @@ -216,6 +216,7 @@ public class OSGiTestBundles { file.read(fileContents); jarOut.write(fileContents); jarOut.closeEntry(); + file.close(); } static URL generateCalculatorBundle() throws IOException { |