Call registerAsParallelCapable via reflection to not add a dependency on java7 (FELIX-3553).

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1441984 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/pom.xml b/framework/pom.xml
index bc40a13..ecb9f0d 100644
--- a/framework/pom.xml
+++ b/framework/pom.xml
@@ -44,8 +44,8 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
-          <target>1.5</target>
-          <source>1.5</source>
+          <target>1.7</target>
+          <source>1.7</source>
         </configuration>
       </plugin>
 
diff --git a/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java b/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java
index 9e33929..485e4ab 100644
--- a/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java
+++ b/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java
@@ -1811,9 +1811,12 @@
         {
             try
             {
-                BundleRevisionImpl.getSecureAction()
-                    .getMethod(ClassLoader.class, "registerAsParallelCapable", null)
-                        .invoke(null);
+                Method method = BundleRevisionImpl.getSecureAction()
+                    .getDeclaredMethod(ClassLoader.class, "registerAsParallelCapable", null);
+
+                 BundleRevisionImpl.getSecureAction().setAccesssible(method);
+
+                 method.invoke(null);
             }
             catch (Throwable th)
             {
@@ -1853,9 +1856,12 @@
          {
              try
              {
-                 BundleRevisionImpl.getSecureAction()
-                    .getMethod(ClassLoader.class, "registerAsParallelCapable", null)
-                        .invoke(null);
+                 Method method = BundleRevisionImpl.getSecureAction()
+                    .getDeclaredMethod(ClassLoader.class, "registerAsParallelCapable", null);
+
+                 BundleRevisionImpl.getSecureAction().setAccesssible(method);
+
+                 method.invoke(null);
              }
              catch (Throwable th)
              {