Change BundleRevisionImpl#bundle to BundleImpl
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1734032 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/BundleRevisionImpl.java b/framework/src/main/java/org/apache/felix/framework/BundleRevisionImpl.java
index b928185..8d30433 100644
--- a/framework/src/main/java/org/apache/felix/framework/BundleRevisionImpl.java
+++ b/framework/src/main/java/org/apache/felix/framework/BundleRevisionImpl.java
@@ -68,7 +68,7 @@
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 @@
/**
* 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 @@
}
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 @@
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 @@
return m_wiring;
}
- public Bundle getBundle()
+ public BundleImpl getBundle()
{
return m_bundle;
}
@@ -641,11 +638,11 @@
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.",
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 d092455..804b834 100644
--- a/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java
+++ b/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java
@@ -613,7 +613,7 @@
{
if (isInUse())
{
- return ((BundleImpl) m_revision.getBundle())
+ return m_revision.getBundle()
.getFramework().getDependencies().getProvidedWires(m_revision, namespace);
}
return null;
@@ -744,7 +744,7 @@
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 @@
}
@Override
- public Bundle getBundle()
+ public BundleImpl getBundle()
{
return m_revision.getBundle();
}
@@ -1096,7 +1096,7 @@
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 @@
{
for (int i = 0;
!result
- && (i < ((BundleImpl) getBundle())
+ && (i < getBundle()
.getFramework().getBootPackages().length);
i++)
{
@@ -1313,14 +1313,14 @@
// 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 @@
}
@Override
- public Bundle getBundle()
+ public BundleImpl getBundle()
{
return m_wiring.getBundle();
}
@@ -2094,7 +2094,7 @@
// 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 @@
}
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