Author: rickhall
Date: Fri Sep 12 13:24:28 2008
New Revision: 694798
URL: http://svn.apache.org/viewvc?rev=694798&view=rev
Log:
Rollback an unintended commit from my previous commit.
Modified:
felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Wire.java
Modified:
felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Wire.java
URL:
http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Wire.java?rev=694798&r1=694797&r2=694798&view=diff
==============================================================================
---
felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Wire.java
(original)
+++
felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Wire.java
Fri Sep 12 13:24:28 2008
@@ -88,24 +88,18 @@
if (m_capability.getNamespace().equals(ICapability.PACKAGE_NAMESPACE)
&&
m_capability.getProperties().get(ICapability.PACKAGE_PROPERTY).equals(pkgName))
{
- // If the importer and the exporter are the same, then
- // just ask for the class from the exporting module's
- // content directly.
- if (m_exporter == m_importer)
+ // Before delegating to the exporting module to satisfy
+ // the class load, we must check the include/exclude filters
+ // from the target package to make sure that the class is
+ // actually visible. However, if the exporting module is the
+ // same as the requesting module, then filtering is not
+ // performed since a module has complete access to itself.
+ if ((m_exporter == m_importer) ||
+
(m_capability.getNamespace().equals(ICapability.PACKAGE_NAMESPACE) &&
+ ((Capability) m_capability).isIncluded(name)))
{
clazz = m_exporter.getContentLoader().getClass(name);
}
- // Otherwise, check the include/exclude filters from the target
- // package to make sure that the class is actually visible. In
- // this case since the importing and exporting modules are
different,
- // we delegate to the exporting module, rather than its content,
- // so that it can follow any internal wires it may have (e.g.,
- // if the package has multiple sources).
- else if
(m_capability.getNamespace().equals(ICapability.PACKAGE_NAMESPACE)
- && ((Capability) m_capability).isIncluded(name))
- {
- clazz = m_exporter.getClass(name);
- }
// If no class was found, then we must throw an exception
// since the exporter for this package did not contain the
@@ -187,4 +181,4 @@
}
return m_importer + " -> " + m_capability + " -> " + m_exporter;
}
-}
\ No newline at end of file
+}