You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cl...@apache.org on 2010/07/12 19:47:34 UTC
svn commit: r963400 - in
/felix/trunk/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal:
ProxyGenerator.java TemporalDependency.java
Author: clement
Date: Mon Jul 12 17:47:33 2010
New Revision: 963400
URL: http://svn.apache.org/viewvc?rev=963400&view=rev
Log:
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.
Modified:
felix/trunk/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/ProxyGenerator.java
felix/trunk/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/TemporalDependency.java
Modified: felix/trunk/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/ProxyGenerator.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/ProxyGenerator.java?rev=963400&r1=963399&r2=963400&view=diff
==============================================================================
--- felix/trunk/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/ProxyGenerator.java (original)
+++ felix/trunk/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/ProxyGenerator.java Mon Jul 12 17:47:33 2010
@@ -123,7 +123,7 @@ public class ProxyGenerator implements O
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.
Modified: felix/trunk/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/TemporalDependency.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/TemporalDependency.java?rev=963400&r1=963399&r2=963400&view=diff
==============================================================================
--- felix/trunk/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/TemporalDependency.java (original)
+++ felix/trunk/ipojo/handler/temporal/src/main/java/org/apache/felix/ipojo/handler/temporal/TemporalDependency.java Mon Jul 12 17:47:33 2010
@@ -350,7 +350,7 @@ public class TemporalDependency extends
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
}