commit | c29a6db7a1f6a6730d8c029b8955a2afb1b6005e | [log] [tgz] |
---|---|---|
author | Clement Escoffier <clement@apache.org> | Mon Jul 12 17:47:33 2010 +0000 |
committer | Clement Escoffier <clement@apache.org> | Mon Jul 12 17:47:33 2010 +0000 |
tree | 5bdef4aa374072ce973bbe5da479b35f20cab404 | |
parent | a729c8ea2b82f2a417e55cda58b675e185a595a8 [diff] |
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 }