commit | 54ce217b4cbfc8e370202353e208cfb8b3be1dde | [log] [tgz] |
---|---|---|
author | Clement Escoffier <clement@apache.org> | Tue Jun 25 17:15:42 2013 +0000 |
committer | Clement Escoffier <clement@apache.org> | Tue Jun 25 17:15:42 2013 +0000 |
tree | b3388754af173e02891714b8a5ad74481039dfb0 | |
parent | 0de558d522c4f659ec738e3f843e5cca976dc681 [diff] |
Fix FELIX-4132 @Modified not working on Equinox The equals method from the TransformedServiceReferenceImpl was wrongly thinking that service.id was a long value (and not a Long object). git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1496543 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/dependency/impl/TransformedServiceReferenceImpl.java b/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/dependency/impl/TransformedServiceReferenceImpl.java index b828758..c7312fb 100644 --- a/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/dependency/impl/TransformedServiceReferenceImpl.java +++ b/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/dependency/impl/TransformedServiceReferenceImpl.java
@@ -153,7 +153,7 @@ if (o instanceof ServiceReference) { Object id1 = ((ServiceReference) o).getProperty(Constants.SERVICE_ID); Object id2 = this.getProperty(Constants.SERVICE_ID); - return id1 == id2; + return (id1 != null && id1.equals(id2)) || (id1 == id2); } return m_origin.equals(o); }