only invokes setAccessible() when necessary now

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@884475 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/core/src/main/java/org/apache/felix/dependencymanager/dependencies/TemporalServiceDependency.java b/dependencymanager/core/src/main/java/org/apache/felix/dependencymanager/dependencies/TemporalServiceDependency.java
index a531e91..02bdfec 100644
--- a/dependencymanager/core/src/main/java/org/apache/felix/dependencymanager/dependencies/TemporalServiceDependency.java
+++ b/dependencymanager/core/src/main/java/org/apache/felix/dependencymanager/dependencies/TemporalServiceDependency.java
@@ -172,7 +172,12 @@
                 }
             }
         }
-        method.setAccessible(true);
-        return method.invoke(service, args);
+        try {
+            return method.invoke(service, args);
+        }
+        catch (IllegalAccessException iae) {
+            method.setAccessible(true);
+            return method.invoke(service, args);
+        }
     }
 }