Fix FELIX-3193
Update the temporal dependency handler to the new API
Set the version of imported package 'org.apache.felix.ipojo' to 1.8.1
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1195529 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/handler/temporal/pom.xml b/ipojo/handler/temporal/pom.xml
index 64d235f..dbb1bcb 100644
--- a/ipojo/handler/temporal/pom.xml
+++ b/ipojo/handler/temporal/pom.xml
@@ -44,7 +44,7 @@
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.ipojo</artifactId>
- <version>1.6.0</version>
+ <version>1.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>asm</groupId>
@@ -73,7 +73,9 @@
</Private-Package>
<Bundle-Name>${project.name}</Bundle-Name>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Import-Package>!org.objectweb.asm.tree, *</Import-Package>
+ <Import-Package>
+ org.apache.felix.ipojo;version=1.8.1,
+ !org.objectweb.asm.tree, *</Import-Package>
<Bundle-Vendor> The Apache Software Foundation </Bundle-Vendor>
<Bundle-Description> iPOJO Temporal Dependency Handler
</Bundle-Description>
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 73e58db..49ea111 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
@@ -18,10 +18,7 @@
*/
package org.apache.felix.ipojo.handler.temporal;
-import java.lang.reflect.Array;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
+import java.lang.reflect.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -222,9 +219,9 @@
* @param pojo : Pojo object
* @param method : called method
* @param args : arguments
- * @see org.apache.felix.ipojo.MethodInterceptor#onEntry(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
+ * @see org.apache.felix.ipojo.MethodInterceptor#onEntry(java.lang.Object, java.lang.reflect.Member, java.lang.Object[])
*/
- public void onEntry(Object pojo, Method method, Object[] args) {
+ public void onEntry(Object pojo, Member method, Object[] args) {
if (m_usage != null) {
Usage usage = (Usage) m_usage.get();
if (usage.m_stack > 0) {
@@ -240,20 +237,20 @@
* @param pojo : POJO object.
* @param method : Method object.
* @param throwable : thrown error
- * @see org.apache.felix.ipojo.MethodInterceptor#onError(java.lang.Object, java.lang.reflect.Method, java.lang.Throwable)
+ * @see org.apache.felix.ipojo.MethodInterceptor#onError(java.lang.Object, java.lang.reflect.Member, java.lang.Throwable)
*/
- public void onError(Object pojo, Method method, Throwable throwable) {
+ public void onError(Object pojo, Member method, Throwable throwable) {
// Nothing to do : wait onFinally
}
/**
* A POJO method has returned.
* @param pojo : POJO object.
- * @param method : Method object.
+ * @param member : Method object.
* @param returnedObj : returned object (null for void method)
- * @see org.apache.felix.ipojo.MethodInterceptor#onExit(java.lang.Object, java.lang.reflect.Method, java.lang.Object)
+ * @see org.apache.felix.ipojo.MethodInterceptor#onExit(java.lang.Object, java.lang.reflect.Member, java.lang.Object)
*/
- public void onExit(Object pojo, Method method, Object returnedObj) {
+ public void onExit(Object pojo, Member member, Object returnedObj) {
// Nothing to do : wait onFinally
}
@@ -261,9 +258,9 @@
* A POJO method is finished.
* @param pojo : POJO object.
* @param method : Method object.
- * @see org.apache.felix.ipojo.MethodInterceptor#onFinally(java.lang.Object, java.lang.reflect.Method)
+ * @see org.apache.felix.ipojo.MethodInterceptor#onFinally(java.lang.Object, java.lang.reflect.Member)
*/
- public void onFinally(Object pojo, Method method) {
+ public void onFinally(Object pojo, Member method) {
if (m_usage != null) {
Usage usage = (Usage) m_usage.get();
if (usage.m_stack > 0) {