Remove dependencies on Java 5. The junit4osgi framework is now compatible with J2ME Foundation Profile 1.1

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@707369 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/examples/junit4osgi/junit4osgi/src/main/java/org/apache/felix/ipojo/junit4osgi/OSGiTestCase.java b/ipojo/examples/junit4osgi/junit4osgi/src/main/java/org/apache/felix/ipojo/junit4osgi/OSGiTestCase.java
index 3f0d4ab..4ae4309 100644
--- a/ipojo/examples/junit4osgi/junit4osgi/src/main/java/org/apache/felix/ipojo/junit4osgi/OSGiTestCase.java
+++ b/ipojo/examples/junit4osgi/junit4osgi/src/main/java/org/apache/felix/ipojo/junit4osgi/OSGiTestCase.java
@@ -150,7 +150,7 @@
 	 */
 	public static void assertEquals(String message, double expected,
 			double actual) {
-		if (Double.compare(expected, actual) != 0) {
+		if (expected != actual) {
 			fail(formatEqualsMessage(message, new Double(expected), new Double(
 					actual)));
 		}
@@ -420,7 +420,7 @@
 			refs = bundle.getBundleContext().getServiceReferences(itf, filter);
 		} catch (InvalidSyntaxException e) {
 			throw new IllegalArgumentException(
-					"Cannot get service references.", e);
+					"Cannot get service references: " + e.getMessage());
 		}
 		if (refs == null) {
 			return new ServiceReference[0];
diff --git a/ipojo/examples/junit4osgi/junit4osgi/src/main/java/org/apache/felix/ipojo/junit4osgi/helpers/IPOJOHelper.java b/ipojo/examples/junit4osgi/junit4osgi/src/main/java/org/apache/felix/ipojo/junit4osgi/helpers/IPOJOHelper.java
index 7d08dea..0218926 100644
--- a/ipojo/examples/junit4osgi/junit4osgi/src/main/java/org/apache/felix/ipojo/junit4osgi/helpers/IPOJOHelper.java
+++ b/ipojo/examples/junit4osgi/junit4osgi/src/main/java/org/apache/felix/ipojo/junit4osgi/helpers/IPOJOHelper.java
@@ -100,8 +100,8 @@
             return fact.createComponentInstance(configuration);
         } catch (Exception e) {
             throw new IllegalArgumentException(
-                    "Cannot create the component instance with the given configuration.",
-                    e);
+                    "Cannot create the component instance with the given configuration:" +
+                    e.getMessage());
         }
     }
 
@@ -187,8 +187,8 @@
             return fact.createComponentInstance(configuration);
         } catch (Exception e) {
             throw new IllegalArgumentException(
-                    "Cannot create the component instance with the given configuration.",
-                    e);
+                    "Cannot create the component instance with the given configuration: " +
+                    e.getMessage());
         }
     }
 
@@ -335,7 +335,7 @@
 
         } catch (InvalidSyntaxException e) {
             throw new IllegalArgumentException(
-                    "Cannot get the component factory services.", e);
+                    "Cannot get the component factory services: " + e.getMessage());
         }
     }
 
@@ -398,7 +398,7 @@
             return null;
         } catch (InvalidSyntaxException e) {
             throw new IllegalArgumentException(
-                    "Cannot get the handler factory services.", e);
+                    "Cannot get the handler factory services: " + e.getMessage());
         }
     }
 
@@ -446,7 +446,7 @@
         } catch (ParseException e) {
             throw new IllegalStateException(
                     "Cannot parse the components from specified bundle ("
-                            + bundle.getSymbolicName() + ").", e);
+                            + bundle.getSymbolicName() + "): " + e.getMessage());
         }
     }
     
@@ -584,7 +584,7 @@
             refs = serviceContext.getServiceReferences(itf, filter);
         } catch (InvalidSyntaxException e) {
             throw new IllegalArgumentException(
-                    "Cannot get service references.", e);
+                    "Cannot get service references: " + e.getMessage());
         }
         if (refs == null) {
             return new ServiceReference[0];