felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1734032 - in /felix/trunk/framework/src/main/java/org/apache/felix/framework: BundleRevisionImpl.java BundleWiringImpl.java
Date Tue, 08 Mar 2016 08:41:27 GMT
Author: gnodet
Date: Tue Mar  8 08:41:27 2016
New Revision: 1734032

URL: http://svn.apache.org/viewvc?rev=1734032&view=rev
Log:
Change BundleRevisionImpl#bundle to BundleImpl

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleRevisionImpl.java
    felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleRevisionImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleRevisionImpl.java?rev=1734032&r1=1734031&r2=1734032&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleRevisionImpl.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleRevisionImpl.java
Tue Mar  8 08:41:27 2016
@@ -68,7 +68,7 @@ public class BundleRevisionImpl implemen
     private final List<String> m_activationIncludes;
     private final List<String> m_activationExcludes;
 
-    private final Bundle m_bundle;
+    private final BundleImpl m_bundle;
 
     private Content m_content;
     private List<Content> m_contentPath;
@@ -81,14 +81,11 @@ public class BundleRevisionImpl implemen
     /**
      * This constructor is used by the extension manager, since it needs
      * a constructor that does not throw an exception.
-     * @param logger
      * @param bundle
      * @param id
-     * @param bootPkgs
-     * @param bootPkgWildcards
      * @throws org.osgi.framework.BundleException
      */
-    public BundleRevisionImpl(Bundle bundle, String id)
+    public BundleRevisionImpl(BundleImpl bundle, String id)
     {
         m_bundle = bundle;
         m_id = id;
@@ -108,7 +105,7 @@ public class BundleRevisionImpl implemen
     }
 
     BundleRevisionImpl(
-        Bundle bundle, String id, Map headerMap, Content content)
+        BundleImpl bundle, String id, Map headerMap, Content content)
         throws BundleException
     {
         m_bundle = bundle;
@@ -117,8 +114,8 @@ public class BundleRevisionImpl implemen
         m_content = content;
 
         ManifestParser mp = new ManifestParser(
-            ((BundleImpl) bundle).getFramework().getLogger(),
-            ((BundleImpl) bundle).getFramework().getConfig(),
+            bundle.getFramework().getLogger(),
+            bundle.getFramework().getConfig(),
             this,
             m_headerMap);
 
@@ -259,7 +256,7 @@ public class BundleRevisionImpl implemen
         return m_wiring;
     }
 
-    public Bundle getBundle()
+    public BundleImpl getBundle()
     {
         return m_bundle;
     }
@@ -641,11 +638,11 @@ public class BundleRevisionImpl implemen
             return m_secureAction.createURL(null,
                 FelixConstants.BUNDLE_URL_PROTOCOL + "://" +
                 m_id + ":" + port + path,
-                ((BundleImpl) getBundle()).getFramework().getBundleStreamHandler());
+                getBundle().getFramework().getBundleStreamHandler());
         }
         catch (MalformedURLException ex)
         {
-            ((BundleImpl) m_bundle).getFramework().getLogger().log(
+            m_bundle.getFramework().getLogger().log(
                 m_bundle,
                 Logger.LOG_ERROR,
                 "Unable to create resource URL.",

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java?rev=1734032&r1=1734031&r2=1734032&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java Tue
Mar  8 08:41:27 2016
@@ -613,7 +613,7 @@ public class BundleWiringImpl implements
     {
         if (isInUse())
         {
-            return ((BundleImpl) m_revision.getBundle())
+            return m_revision.getBundle()
                 .getFramework().getDependencies().getProvidedWires(m_revision, namespace);
         }
         return null;
@@ -744,7 +744,7 @@ public class BundleWiringImpl implements
             if (!Util.isFragment(m_revision))
             {
                 Enumeration<URL> e =
-                    ((BundleImpl) m_revision.getBundle()).getFramework()
+                    m_revision.getBundle().getFramework()
                         .findBundleEntries(m_revision, path, filePattern,
                            (options & BundleWiring.FINDENTRIES_RECURSE) > 0);
                 List<URL> entries = new ArrayList<URL>();
@@ -1072,7 +1072,7 @@ public class BundleWiringImpl implements
     }
 
     @Override
-    public Bundle getBundle()
+    public BundleImpl getBundle()
     {
         return m_revision.getBundle();
     }
@@ -1096,7 +1096,7 @@ public class BundleWiringImpl implements
             return BundleRevisionImpl.getSecureAction().createURL(null,
                 FelixConstants.BUNDLE_URL_PROTOCOL + "://" +
                 m_revision.getId() + ":" + port + path,
-                ((BundleImpl) getBundle()).getFramework().getBundleStreamHandler());
+                getBundle().getFramework().getBundleStreamHandler());
         }
         catch (MalformedURLException ex)
         {
@@ -1305,7 +1305,7 @@ public class BundleWiringImpl implements
         {
             for (int i = 0;
                 !result
-                    && (i < ((BundleImpl) getBundle())
+                    && (i < getBundle()
                         .getFramework().getBootPackages().length);
                 i++)
             {
@@ -1313,14 +1313,14 @@ public class BundleWiringImpl implements
                 // A wildcarded boot package will be in the form "foo.",
                 // so a matching subpackage will start with "foo.", e.g.,
                 // "foo.bar".
-                if (((BundleImpl) getBundle()).getFramework().getBootPackageWildcards()[i]
+                if (getBundle().getFramework().getBootPackageWildcards()[i]
                     && pkgName.startsWith(
-                        ((BundleImpl) getBundle()).getFramework().getBootPackages()[i]))
+                        getBundle().getFramework().getBootPackages()[i]))
                 {
                     return true;
                 }
                 // If not wildcarded, then check for an exact match.
-                else if (((BundleImpl) getBundle())
+                else if (getBundle()
                     .getFramework().getBootPackages()[i].equals(pkgName))
                 {
                     return true;
@@ -1993,7 +1993,7 @@ public class BundleWiringImpl implements
         }
 
         @Override
-        public Bundle getBundle()
+        public BundleImpl getBundle()
         {
             return m_wiring.getBundle();
         }
@@ -2094,7 +2094,7 @@ public class BundleWiringImpl implements
                     // or removal, we just get a snapshot and leave any changes
                     // as a race condition, doing any necessary clean up in
                     // the error handling.
-                    Felix felix = ((BundleImpl) m_wiring.m_revision.getBundle()).getFramework();
+                    Felix felix = m_wiring.m_revision.getBundle().getFramework();
 
                     Set<ServiceReference<WeavingHook>> hooks =
                         felix.getHookRegistry().getHooks(WeavingHook.class);
@@ -2290,9 +2290,9 @@ public class BundleWiringImpl implements
                     }
 
                     int activationPolicy =
-                            ((BundleImpl) getBundle()).isDeclaredActivationPolicyUsed()
-                            ? ((BundleRevisionImpl) getBundle()
-                                    .adapt(BundleRevision.class)).getDeclaredActivationPolicy()
+                            getBundle().isDeclaredActivationPolicyUsed()
+                            ? getBundle()
+                                    .adapt(BundleRevisionImpl.class).getDeclaredActivationPolicy()
                                     : EAGER_ACTIVATION;
 
                     // If the revision is using deferred activation, then if



Mime
View raw message