felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r370891 - /incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/ServiceReferenceImpl.java
Date Fri, 20 Jan 2006 19:32:23 GMT
Author: rickhall
Date: Fri Jan 20 11:32:21 2006
New Revision: 370891

URL: http://svn.apache.org/viewcvs?rev=370891&view=rev
Log:
Modified getBundle() to return null if the service is unregistered.

Modified:
    incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/ServiceReferenceImpl.java

Modified: incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/ServiceReferenceImpl.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/ServiceReferenceImpl.java?rev=370891&r1=370890&r2=370891&view=diff
==============================================================================
--- incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/ServiceReferenceImpl.java
(original)
+++ incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/ServiceReferenceImpl.java
Fri Jan 20 11:32:21 2006
@@ -49,7 +49,9 @@
 
     public Bundle getBundle()
     {
-        return m_bundle;
+        // The spec says that this should return null if
+        // the service is unregistered.
+        return (m_registration.isValid()) ? m_bundle : null;
     }
 
     public Bundle[] getUsingBundles()



Mime
View raw message