felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1773432 - /felix/trunk/dependencymanager/org.apache.felix.dependencymanager.itest/src/org/apache/felix/dm/itest/api/FELIX5400_OverrideDefaultMapConfigTypeWithEmptyList.java
Date Fri, 09 Dec 2016 16:42:22 GMT
Author: pderop
Date: Fri Dec  9 16:42:22 2016
New Revision: 1773432

URL: http://svn.apache.org/viewvc?rev=1773432&view=rev
Log:
FELIX-5400: Adding missing null check on the cnf argument in the MyComponent.updated method.

Modified:
    felix/trunk/dependencymanager/org.apache.felix.dependencymanager.itest/src/org/apache/felix/dm/itest/api/FELIX5400_OverrideDefaultMapConfigTypeWithEmptyList.java

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.itest/src/org/apache/felix/dm/itest/api/FELIX5400_OverrideDefaultMapConfigTypeWithEmptyList.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.itest/src/org/apache/felix/dm/itest/api/FELIX5400_OverrideDefaultMapConfigTypeWithEmptyList.java?rev=1773432&r1=1773431&r2=1773432&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.itest/src/org/apache/felix/dm/itest/api/FELIX5400_OverrideDefaultMapConfigTypeWithEmptyList.java
(original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.itest/src/org/apache/felix/dm/itest/api/FELIX5400_OverrideDefaultMapConfigTypeWithEmptyList.java
Fri Dec  9 16:42:22 2016
@@ -70,9 +70,11 @@ public class FELIX5400_OverrideDefaultMa
     
     public class MyComponent {
         void updated(MyConfig cnf) {
-        	List<String> list = cnf.getList();
-        	Assert.assertEquals(0, list.size()); // the actual configuration contains "list=[]"
and default "list=[a,b]" must not be returned.
-        	m_ensure.step(2);
+        	if (cnf != null) {
+        		List<String> list = cnf.getList();
+        		Assert.assertEquals(0, list.size()); // the actual configuration contains "list=[]"
and default "list=[a,b]" must not be returned.
+        		m_ensure.step(2);
+        	}
         }
     }
 }



Mime
View raw message