Cleanup and improve messages
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1357574 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/configadmin/src/test/java/org/apache/felix/cm/MockBundleContext.java b/configadmin/src/test/java/org/apache/felix/cm/MockBundleContext.java
index af847b3..8c7a579 100644
--- a/configadmin/src/test/java/org/apache/felix/cm/MockBundleContext.java
+++ b/configadmin/src/test/java/org/apache/felix/cm/MockBundleContext.java
@@ -27,11 +27,9 @@
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
import org.osgi.framework.BundleListener;
import org.osgi.framework.Filter;
import org.osgi.framework.FrameworkListener;
-import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceListener;
import org.osgi.framework.ServiceReference;
import org.osgi.framework.ServiceRegistration;
@@ -103,7 +101,7 @@
* org.osgi.framework.BundleContext#addServiceListener(org.osgi.framework
* .ServiceListener, java.lang.String)
*/
- public void addServiceListener( ServiceListener arg0, String arg1 ) throws InvalidSyntaxException
+ public void addServiceListener( ServiceListener arg0, String arg1 )
{
}
@@ -112,7 +110,7 @@
* (non-Javadoc)
* @see org.osgi.framework.BundleContext#createFilter(java.lang.String)
*/
- public Filter createFilter( String arg0 ) throws InvalidSyntaxException
+ public Filter createFilter( String arg0 )
{
return null;
}
@@ -124,7 +122,7 @@
* org.osgi.framework.BundleContext#getAllServiceReferences(java.lang.String
* , java.lang.String)
*/
- public ServiceReference[] getAllServiceReferences( String arg0, String arg1 ) throws InvalidSyntaxException
+ public ServiceReference[] getAllServiceReferences( String arg0, String arg1 )
{
return null;
}
@@ -208,7 +206,7 @@
* org.osgi.framework.BundleContext#getServiceReferences(java.lang.String,
* java.lang.String)
*/
- public ServiceReference[] getServiceReferences( String arg0, String arg1 ) throws InvalidSyntaxException
+ public ServiceReference[] getServiceReferences( String arg0, String arg1 )
{
return null;
}
@@ -218,7 +216,7 @@
* (non-Javadoc)
* @see org.osgi.framework.BundleContext#installBundle(java.lang.String)
*/
- public Bundle installBundle( String arg0 ) throws BundleException
+ public Bundle installBundle( String arg0 )
{
return null;
}
@@ -229,7 +227,7 @@
* @see org.osgi.framework.BundleContext#installBundle(java.lang.String,
* java.io.InputStream)
*/
- public Bundle installBundle( String arg0, InputStream arg1 ) throws BundleException
+ public Bundle installBundle( String arg0, InputStream arg1 )
{
return null;
}
@@ -303,29 +301,24 @@
public <S> ServiceRegistration<S> registerService( Class<S> clazz, S service, Dictionary<String, ?> properties )
{
- // TODO Auto-generated method stub
return null;
}
public <S> ServiceReference<S> getServiceReference( Class<S> clazz )
{
- // TODO Auto-generated method stub
return null;
}
public <S> Collection<ServiceReference<S>> getServiceReferences( Class<S> clazz, String filter )
- throws InvalidSyntaxException
{
- // TODO Auto-generated method stub
return null;
}
public Bundle getBundle( String location )
{
- // TODO Auto-generated method stub
return null;
}
}
diff --git a/configadmin/src/test/java/org/apache/felix/cm/file/FilePersistenceManagerConstructorTest.java b/configadmin/src/test/java/org/apache/felix/cm/file/FilePersistenceManagerConstructorTest.java
index 08e5d3c..8e106f1 100644
--- a/configadmin/src/test/java/org/apache/felix/cm/file/FilePersistenceManagerConstructorTest.java
+++ b/configadmin/src/test/java/org/apache/felix/cm/file/FilePersistenceManagerConstructorTest.java
@@ -25,9 +25,6 @@
import org.apache.felix.cm.MockBundleContext;
import org.osgi.framework.BundleContext;
-/**
- * The <code>FilePersistenceManagerConstructorTest</code> TODO
- */
public class FilePersistenceManagerConstructorTest extends TestCase
{
diff --git a/configadmin/src/test/java/org/apache/felix/cm/file/FilePersistenceManagerTest.java b/configadmin/src/test/java/org/apache/felix/cm/file/FilePersistenceManagerTest.java
index 0b6444e..63b627f 100644
--- a/configadmin/src/test/java/org/apache/felix/cm/file/FilePersistenceManagerTest.java
+++ b/configadmin/src/test/java/org/apache/felix/cm/file/FilePersistenceManagerTest.java
@@ -32,9 +32,6 @@
import junit.framework.TestCase;
-/**
- * The <code>FilePersistenceManagerTest</code> TODO
- */
public class FilePersistenceManagerTest extends TestCase
{
private File file = new File( System.getProperty( "java.io.tmpdir" ), "config" );
diff --git a/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationBaseTest.java b/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationBaseTest.java
index 137ab48..dbed3f9 100644
--- a/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationBaseTest.java
+++ b/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationBaseTest.java
@@ -595,7 +595,7 @@
// assert activater has no configuration
TestCase.assertNull( "Expect no Properties after Service Registration", tester.props );
- TestCase.assertEquals( "Expect no update call", 1, tester.numManagedServiceUpdatedCalls );
+ TestCase.assertEquals( "Expect update call", 1, tester.numManagedServiceUpdatedCalls );
// configure after ManagedServiceRegistration --> configure via update
configure( pid );
@@ -603,7 +603,7 @@
// assert activater has configuration
TestCase.assertNotNull( "Expect Properties after Service Registration", tester.props );
- TestCase.assertEquals( "Expect a single update call", 2, tester.numManagedServiceUpdatedCalls );
+ TestCase.assertEquals( "Expect a second update call", 2, tester.numManagedServiceUpdatedCalls );
// stop the bundle now
bundle.stop();
diff --git a/configadmin/src/test/java/org/apache/felix/cm/integration/helper/ConfigureThread.java b/configadmin/src/test/java/org/apache/felix/cm/integration/helper/ConfigureThread.java
index db5c114..ae849ba 100644
--- a/configadmin/src/test/java/org/apache/felix/cm/integration/helper/ConfigureThread.java
+++ b/configadmin/src/test/java/org/apache/felix/cm/integration/helper/ConfigureThread.java
@@ -71,7 +71,7 @@
}
catch ( IOException ioe )
{
- // TODO: log !!
+ // ignore
}
}
@@ -85,7 +85,7 @@
}
catch ( IOException ioe )
{
- // TODO: log !!
+ // ignore
}
}
}
\ No newline at end of file
diff --git a/configadmin/src/test/java/org/apache/felix/cm/integration/helper/ManagedServiceFactoryThread.java b/configadmin/src/test/java/org/apache/felix/cm/integration/helper/ManagedServiceFactoryThread.java
index 94dcec6..54ab201 100644
--- a/configadmin/src/test/java/org/apache/felix/cm/integration/helper/ManagedServiceFactoryThread.java
+++ b/configadmin/src/test/java/org/apache/felix/cm/integration/helper/ManagedServiceFactoryThread.java
@@ -106,7 +106,7 @@
synchronized ( configs )
{
configs.add( properties );
- configured = true;
+ configured = properties != null;
}
}
}
\ No newline at end of file