Fix FELIX-2472 [iPOJO] Proxies should throw the OSGi service exception for the temporal dependency handler. Just replaced the former NPE by a Runtime Exception.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@963400 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/ProxyGenerator.java b/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/ProxyGenerator.java
index 90013a3..a3fcd69 100644
--- a/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/ProxyGenerator.java
+++ b/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/ProxyGenerator.java
@@ -123,7 +123,7 @@
         int varSvc = freeRoom; 
         freeRoom = freeRoom + 1; // Object Reference.
         mv.visitVarInsn(ASTORE, varSvc); // Store the service object.
-        
+                
         // Invoke the method on the service object.
         mv.visitVarInsn(ALOAD, varSvc);
         // Push argument on the stack.
diff --git a/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/TemporalDependency.java b/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/TemporalDependency.java
index 44767d6..73e58db 100644
--- a/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/TemporalDependency.java
+++ b/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/TemporalDependency.java
@@ -350,7 +350,7 @@
             if (exhausted) {
                 Object obj =  onTimeout(); // Throw the Runtime Exception
                 if (obj == null) {
-                    throw new NullPointerException("No service available"); // NPE if null.
+                    throw new RuntimeException("No service available"); // Runtime Exception to be consistent with iPOJO Core.
                 } else {
                     return obj; // Return a nullable or DI
                 }