aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mnutt...@apache.org
Subject svn commit: r1646472 - /aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/impl/EntityManagerFactoryManager.java
Date Thu, 18 Dec 2014 15:05:20 GMT
Author: mnuttall
Date: Thu Dec 18 15:05:20 2014
New Revision: 1646472

URL: http://svn.apache.org/r1646472
Log:
Aries-1075: NullPointerException in EntityManagerFactoryManager.providerRemoved - from a patch
by Simon Gormley

Modified:
    aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/impl/EntityManagerFactoryManager.java

Modified: aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/impl/EntityManagerFactoryManager.java
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/impl/EntityManagerFactoryManager.java?rev=1646472&r1=1646471&r2=1646472&view=diff
==============================================================================
--- aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/impl/EntityManagerFactoryManager.java
(original)
+++ aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/impl/EntityManagerFactoryManager.java
Thu Dec 18 15:05:20 2014
@@ -124,9 +124,12 @@ public class EntityManagerFactoryManager
    * @param ref  The provider service reference
    * @return true if the the provider is being used by this manager
    */
-  public synchronized boolean providerRemoved(ServiceReference ref) {
-    
-    boolean toReturn = provider.equals(ref);
+  public synchronized boolean providerRemoved(ServiceReference ref) 
+  {
+    boolean toReturn = false;
+    if (provider != null) {
+    	toReturn = provider.equals(ref);
+    }
     
     if(toReturn)
       destroy();



Mime
View raw message