You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pa...@apache.org on 2018/04/03 13:03:51 UTC
svn commit: r1828231 - in /felix/trunk/osgi-r7/framework/src:
main/java/org/apache/felix/framework/
main/java/org/apache/felix/framework/util/ main/resources/
test/java/org/apache/felix/framework/
Author: pauls
Date: Tue Apr 3 13:03:50 2018
New Revision: 1828231
URL: http://svn.apache.org/viewvc?rev=1828231&view=rev
Log:
FELIX-5800: Clean-up default properties handling to make it easier to calculate system packages.
Modified:
felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java
felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/Felix.java
felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/util/FelixConstants.java
felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/util/Util.java
felix/trunk/osgi-r7/framework/src/main/resources/default.properties
felix/trunk/osgi-r7/framework/src/test/java/org/apache/felix/framework/ExtensionManagerTest.java
Modified: felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java?rev=1828231&r1=1828230&r2=1828231&view=diff
==============================================================================
--- felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java (original)
+++ felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java Tue Apr 3 13:03:50 2018
@@ -24,6 +24,7 @@ import org.apache.felix.framework.cache.
import org.apache.felix.framework.ext.ClassPathExtenderFactory;
import org.apache.felix.framework.util.FelixConstants;
import org.apache.felix.framework.util.ImmutableList;
+import org.apache.felix.framework.util.ImmutableMap;
import org.apache.felix.framework.util.StringMap;
import org.apache.felix.framework.util.Util;
import org.apache.felix.framework.util.manifestparser.ManifestParser;
@@ -72,28 +73,9 @@ import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
/**
- * The ExtensionManager class is used in several ways.
- * <p>
- * First, a private instance is added (as URL with the instance as
- * URLStreamHandler) to the classloader that loaded the class.
- * It is assumed that this is an instance of URLClassloader (if not extension
- * bundles will not work). Subsequently, extension bundles can be managed by
- * instances of this class (their will be one instance per framework instance).
- * </p>
- * <p>
- * Second, it is used as module definition of the systembundle. Added extension
- * bundles with exported packages will contribute their exports to the
- * systembundle export.
- * </p>
- * <p>
- * Third, it is used as content loader of the systembundle. Added extension
+ * The ExtensionManager class is used as content loader of the systembundle. Added extension
* bundles exports will be available via this loader.
- * </p>
*/
-// The general approach is to have one private static instance that we register
-// with the parent classloader and one instance per framework instance that
-// keeps track of extension bundles and systembundle exports for that framework
-// instance.
class ExtensionManager implements Content
{
static final ClassPathExtenderFactory.ClassPathExtender m_extenderFramework;
@@ -107,7 +89,7 @@ class ExtensionManager implements Conten
if (!"true".equalsIgnoreCase(Felix.m_secureAction.getSystemProperty(FelixConstants.FELIX_EXTENSIONS_DISABLE, "false")))
{
ServiceLoader<ClassPathExtenderFactory> loader = ServiceLoader.load(ClassPathExtenderFactory.class,
- ExtensionManager.class.getClassLoader());
+ ExtensionManager.class.getClassLoader());
for (Iterator<ClassPathExtenderFactory> iter = loader.iterator();
@@ -170,7 +152,6 @@ class ExtensionManager implements Conten
private final BundleRevisionImpl m_systemBundleRevision;
private volatile List<BundleCapability> m_capabilities = Collections.EMPTY_LIST;
private volatile Set<String> m_exportNames = Collections.EMPTY_SET;
- private volatile Object m_securityContext = null;
private final List<ExtensionTuple> m_extensionTuples = Collections.synchronizedList(new ArrayList<ExtensionTuple>());
private final List<BundleRevisionImpl> m_resolvedExtensions = new CopyOnWriteArrayList<BundleRevisionImpl>();
@@ -232,18 +213,18 @@ class ExtensionManager implements Conten
"true".equalsIgnoreCase(configProps.getProperty(FelixConstants.USE_PROPERTY_SUBSTITUTION_IN_SYSTEMPACKAGES)) ?
Util.getPropertyWithSubs(configProps, FelixConstants.FRAMEWORK_SYSTEMPACKAGES) :
configProps.getProperty(FelixConstants.FRAMEWORK_SYSTEMPACKAGES);
- // If no system packages were specified, load our default value.
- syspkgs = (syspkgs == null)
- ? Util.getDefaultProperty(logger, Constants.FRAMEWORK_SYSTEMPACKAGES)
- : syspkgs;
+
syspkgs = (syspkgs == null) ? "" : syspkgs;
+
// If any extra packages are specified, then append them.
String pkgextra =
"true".equalsIgnoreCase(configProps.getProperty(FelixConstants.USE_PROPERTY_SUBSTITUTION_IN_SYSTEMPACKAGES)) ?
Util.getPropertyWithSubs(configProps, FelixConstants.FRAMEWORK_SYSTEMPACKAGES_EXTRA) :
configProps.getProperty(FelixConstants.FRAMEWORK_SYSTEMPACKAGES_EXTRA);
+
syspkgs = ((pkgextra == null) || (pkgextra.trim().length() == 0))
? syspkgs : syspkgs + (pkgextra.trim().startsWith(",") ? pkgextra : "," + pkgextra);
+
m_headerMap.put(FelixConstants.BUNDLE_MANIFESTVERSION, "2");
m_headerMap.put(FelixConstants.EXPORT_PACKAGE, syspkgs);
@@ -252,16 +233,12 @@ class ExtensionManager implements Conten
// construct the system bundle's capabilitie metadata. Get the
// configuration property that specifies which capabilities should
// be provided by the system bundle.
- String syscaps =
- (String) Util.getPropertyWithSubs(configProps, FelixConstants.FRAMEWORK_SYSTEMCAPABILITIES);
- // If no system capabilities were specified, load our default value.
- syscaps = (syscaps == null)
- ? Util.getDefaultProperty(logger, Constants.FRAMEWORK_SYSTEMCAPABILITIES)
- : syscaps;
+ String syscaps = Util.getPropertyWithSubs(configProps, Constants.FRAMEWORK_SYSTEMCAPABILITIES);
+
syscaps = (syscaps == null) ? "" : syscaps;
+
// If any extra capabilities are specified, then append them.
- String capextra =
- (String) Util.getPropertyWithSubs(configProps, FelixConstants.FRAMEWORK_SYSTEMCAPABILITIES_EXTRA);
+ String capextra = Util.getPropertyWithSubs(configProps, Constants.FRAMEWORK_SYSTEMCAPABILITIES_EXTRA);
syscaps = ((capextra == null) || (capextra.trim().length() == 0))
? syscaps : syscaps + (capextra.trim().startsWith(",") ? capextra : "," + capextra);
m_headerMap.put(FelixConstants.PROVIDE_CAPABILITY, syscaps);
@@ -328,7 +305,6 @@ class ExtensionManager implements Conten
* exports of this instance. Subsequently, they are available form the
* instance in it's role as content loader.
*
- * @param felix the framework instance the given extension bundle comes from.
* @param bundle the extension bundle to add.
* @throws BundleException if extension bundles are not supported or this is
* not a framework extension.
@@ -336,7 +312,7 @@ class ExtensionManager implements Conten
* AdminPermission.EXTENSIONLIFECYCLE and security is enabled.
* @throws Exception in case something goes wrong.
*/
- synchronized void addExtensionBundle(Felix felix, BundleImpl bundle) throws Exception
+ void addExtensionBundle(BundleImpl bundle) throws Exception
{
Object sm = System.getSecurityManager();
if (sm != null)
@@ -354,8 +330,6 @@ class ExtensionManager implements Conten
((BundleRevisionImpl) bundle.adapt(BundleRevision.class))
.getHeaders().get(Constants.FRAGMENT_HOST));
- final ClassPathExtenderFactory.ClassPathExtender extender;
-
if (!Constants.EXTENSION_FRAMEWORK.equals(directive))
{
throw new BundleException("Unsupported Extension Bundle type: " +
@@ -366,7 +340,8 @@ class ExtensionManager implements Conten
{
// We don't support extensions
m_logger.log(bundle, Logger.LOG_WARNING,
- "Unable to add extension bundle - Maybe ClassLoader is not supported (on java9, try --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED)?");
+ "Unable to add extension bundle - Maybe ClassLoader is not supported " +
+ "(on java9, try --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED)?");
throw new UnsupportedOperationException(
"Unable to add extension bundle.");
@@ -406,7 +381,7 @@ class ExtensionManager implements Conten
m_unresolvedExtensions.add(bri);
}
- public void removeExtensionBundles(Felix felix)
+ public synchronized void removeExtensionBundles()
{
m_resolvedExtensions.clear();
m_unresolvedExtensions.clear();
@@ -430,7 +405,7 @@ class ExtensionManager implements Conten
}
}
- public List<Bundle> resolveExtensionBundles(Felix felix)
+ public synchronized List<Bundle> resolveExtensionBundles(Felix felix)
{
if (m_unresolvedExtensions.isEmpty())
{
@@ -554,7 +529,7 @@ class ExtensionManager implements Conten
}
/**
- * Start extension bundles that hasve an activator
+ * Start extension bundle if it has an activator
*
* @param felix the framework instance the extension bundle is installed in.
* @param bundle the extension bundle to start if it has a an extension bundle activator.
@@ -799,21 +774,20 @@ class ExtensionManager implements Conten
return result;
}
- private synchronized void appendCapabilities(List<BundleCapability> caps)
+ private void appendCapabilities(List<BundleCapability> caps)
{
List<BundleCapability> newCaps = new ArrayList<BundleCapability>(m_capabilities.size() + caps.size());
newCaps.addAll(m_capabilities);
newCaps.addAll(caps);
m_capabilities = ImmutableList.newInstance(newCaps);
- m_headerMap.put(Constants.EXPORT_PACKAGE, convertCapabilitiesToHeaders(m_headerMap));
+ m_headerMap.put(Constants.EXPORT_PACKAGE, convertCapabilitiesToHeaders(newCaps));
}
- private String convertCapabilitiesToHeaders(Map headers)
+ private String convertCapabilitiesToHeaders(List<BundleCapability> caps)
{
StringBuffer exportSB = new StringBuffer("");
Set<String> exportNames = new HashSet<String>();
- List<BundleCapability> caps = m_capabilities;
for (BundleCapability cap : caps)
{
if (cap.getNamespace().equals(BundleRevision.PACKAGE_NAMESPACE))
@@ -928,10 +902,7 @@ class ExtensionManager implements Conten
@Override
public Map getHeaders()
{
- synchronized (ExtensionManager.this)
- {
- return m_headerMap;
- }
+ return ImmutableMap.newInstance(m_headerMap);
}
@Override
Modified: felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/Felix.java
URL: http://svn.apache.org/viewvc/felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/Felix.java?rev=1828231&r1=1828230&r2=1828231&view=diff
==============================================================================
--- felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/Felix.java (original)
+++ felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/Felix.java Tue Apr 3 13:03:50 2018
@@ -1615,8 +1615,6 @@ public class Felix extends BundleImpl im
* bundles.
* @throws java.lang.IllegalArgumentException If the specified start
* level is not greater than zero.
- * @throws java.security.SecurityException If the caller does not
- * have <tt>AdminPermission</tt>.
**/
void setInitialBundleStartLevel(int startLevel)
{
@@ -1656,8 +1654,6 @@ public class Felix extends BundleImpl im
* @throws java.lang.IllegalArgumentException If the specified
* bundle is the system bundle or if the bundle has been
* uninstalled.
- * @throws java.security.SecurityException If the caller does not
- * have <tt>AdminPermission</tt>.
**/
void setBundleStartLevel(Bundle bundle, int startLevel)
{
@@ -2544,7 +2540,7 @@ public class Felix extends BundleImpl im
// then attach the extension
if (!wasExtension && bundle.isExtension())
{
- m_extensionManager.addExtensionBundle(this, bundle);
+ m_extensionManager.addExtensionBundle(bundle);
}
else if (wasExtension)
{
@@ -3136,7 +3132,7 @@ public class Felix extends BundleImpl im
// Extensions are handled as a special case.
if (bundle.isExtension())
{
- m_extensionManager.addExtensionBundle(this, bundle);
+ m_extensionManager.addExtensionBundle(bundle);
}
// Use a copy-on-write approach to add the bundle
@@ -3256,7 +3252,7 @@ public class Felix extends BundleImpl im
}
else
{
- m_extensionManager.addExtensionBundle(this, bundle);
+ m_extensionManager.addExtensionBundle(bundle);
}
}
catch (Throwable ex)
@@ -4804,7 +4800,7 @@ public class Felix extends BundleImpl im
* Fires service events.
*
* @param event The service event to fire.
- * @param reg The service registration associated with the service object.
+ * @param oldProps The old props of the service.
**/
private void fireServiceEvent(ServiceEvent event, Dictionary oldProps)
{
@@ -4851,11 +4847,35 @@ public class Felix extends BundleImpl im
FelixConstants.FELIX_VERSION_PROPERTY, getFrameworkVersion());
Properties defaultProperties = Util.loadDefaultProperties(m_logger);
+
+ Util.initializeJPMS(defaultProperties);
+
+ Util.initializeJPMSEE(_getProperty("java.specification.version"), defaultProperties, m_logger);
+
// Set supported execution environments to default value,
// if not explicitly configured.
loadFromDefaultIfNotDefined(defaultProperties, Constants.FRAMEWORK_EXECUTIONENVIRONMENT);
- loadFromDefaultIfNotDefined(defaultProperties, Constants.FRAMEWORK_SYSTEMPACKAGES);
+ String sysprops = _getProperty(Constants.FRAMEWORK_SYSTEMPACKAGES);
+ if(sysprops != null && "true".equalsIgnoreCase(_getProperty(FelixConstants.USE_PROPERTY_SUBSTITUTION_IN_SYSTEMPACKAGES)) )
+ {
+ defaultProperties.put(Constants.FRAMEWORK_SYSTEMPACKAGES, sysprops);
+ m_configMutableMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES, Util.getPropertyWithSubs(defaultProperties, Constants.FRAMEWORK_SYSTEMPACKAGES));
+ }
+ else if (sysprops == null)
+ {
+ m_configMutableMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES, Util.getPropertyWithSubs(defaultProperties, Constants.FRAMEWORK_SYSTEMPACKAGES));
+ }
+
+ String syscaps = _getProperty(Constants.FRAMEWORK_SYSTEMCAPABILITIES);
+ if(syscaps == null)
+ {
+ m_configMutableMap.put(Constants.FRAMEWORK_SYSTEMCAPABILITIES, Util.getPropertyWithSubs(defaultProperties, Constants.FRAMEWORK_SYSTEMCAPABILITIES));
+ }
+
+ loadFromDefaultIfNotDefined(defaultProperties, "ee-jpms");
+ loadFromDefaultIfNotDefined(defaultProperties, "eecap-jpms");
+ loadFromDefaultIfNotDefined(defaultProperties, "felix.detect.java.version");
// Set supported native capabilities to default value,
// if not explicitly configured.
@@ -4870,7 +4890,7 @@ public class Felix extends BundleImpl im
String s;
if (!getConfig().containsKey(propertyName))
{
- s = Util.getDefaultProperty(m_logger, propertyName);
+ s = Util.getPropertyWithSubs(defaultProperties, propertyName);
if (s != null)
{
m_configMutableMap.put(propertyName, s);
@@ -4880,7 +4900,7 @@ public class Felix extends BundleImpl im
private void loadPrefixFromDefaultIfNotDefined(Map configMap, Properties defaultProperties, String prefix)
{
- Map<String, String> defaultPropsWithPrefix = Util.getDefaultPropertiesWithPrefix(defaultProperties, prefix);
+ Map<String, String> defaultPropsWithPrefix = Util.getPropertiesWithPrefix(defaultProperties, prefix);
for(String currentDefaultProperty: defaultPropsWithPrefix.keySet())
{
@@ -5206,7 +5226,7 @@ public class Felix extends BundleImpl im
m_securityManager = null;
}
- m_extensionManager.removeExtensionBundles(Felix.this);
+ m_extensionManager.removeExtensionBundles();
m_dependencies.removeDependents(adapt(BundleRevision.class));
// Dispose of the bundle cache.
Modified: felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/util/FelixConstants.java
URL: http://svn.apache.org/viewvc/felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/util/FelixConstants.java?rev=1828231&r1=1828230&r2=1828231&view=diff
==============================================================================
--- felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/util/FelixConstants.java (original)
+++ felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/util/FelixConstants.java Tue Apr 3 13:03:50 2018
@@ -71,4 +71,5 @@ public interface FelixConstants extends
String FELIX_EXTENSION_ACTIVATOR = "Felix-Activator";
String SECURITY_DEFAULT_POLICY = "felix.security.defaultpolicy";
String FELIX_EXTENSIONS_DISABLE = "felix.extensions.disable";
+ String FRAMEWORK_UUID_SECURE = "felix.uuid.secure";
}
Modified: felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/util/Util.java
URL: http://svn.apache.org/viewvc/felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/util/Util.java?rev=1828231&r1=1828230&r2=1828231&view=diff
==============================================================================
--- felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/util/Util.java (original)
+++ felix/trunk/osgi-r7/framework/src/main/java/org/apache/felix/framework/util/Util.java Tue Apr 3 13:03:50 2018
@@ -50,6 +50,7 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
+import java.util.Random;
import java.util.Set;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
@@ -91,10 +92,62 @@ public class Util
Logger.LOG_ERROR, "Unable to load any configuration properties.", ex);
}
}
- return initializeJPMS(defaultProperties);
+ return defaultProperties;
}
- private static Properties initializeJPMS(Properties properties)
+ public static void initializeJPMSEE(String javaVersion, Properties properties, Logger logger)
+ {
+ try
+ {
+ Version version = new Version(javaVersion);
+
+ if (version.getMajor() >= 9)
+ {
+ StringBuilder eecap = new StringBuilder(", osgi.ee; osgi.ee=\"OSGi/Minimum\"; version:List<Version>=\"1.0,1.1,1.2\",osgi.ee; osgi.ee=\"JavaSE\"; version:List<Version>=\"1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9");
+ for (int i = 10; i <= version.getMajor();i++)
+ {
+ eecap.append(',').append(Integer.toString(version.getMajor()));
+ }
+ eecap.append("\",osgi.ee; osgi.ee=\"JavaSE/compact1\"; version:List<Version>=\"1.8,9");
+ for (int i = 10; i <= version.getMajor();i++)
+ {
+ eecap.append(',').append(Integer.toString(version.getMajor()));
+ }
+ eecap.append("\",osgi.ee; osgi.ee=\"JavaSE/compact2\"; version:List<Version>=\"1.8,9");
+ for (int i = 10; i <= version.getMajor();i++)
+ {
+ eecap.append(',').append(Integer.toString(version.getMajor()));
+ }
+ eecap.append("\",osgi.ee; osgi.ee=\"JavaSE/compact3\"; version:List<Version>=\"1.8,9");
+ for (int i = 10; i <= version.getMajor();i++)
+ {
+ eecap.append(',').append(Integer.toString(version.getMajor()));
+ }
+ eecap.append("\"");
+
+ StringBuilder ee = new StringBuilder();
+
+ for (int i = version.getMajor(); i > 9;i--)
+ {
+ ee.append("JavaSE-").append(Integer.toString(i)).append(',');
+ }
+
+ ee.append("JavaSE-9,JavaSE-1.8,JavaSE-1.7,JavaSE-1.6,J2SE-1.5,J2SE-1.4,J2SE-1.3,J2SE-1.2,JRE-1.1,JRE-1.0,OSGi/Minimum-1.2,OSGi/Minimum-1.1,OSGi/Minimum-1.0");
+
+ properties.put("ee-jpms", ee.toString());
+
+ properties.put("eecap-jpms", eecap.toString());
+ }
+
+ properties.put("felix.detect.java.version", String.format("0.0.0.JavaSE_%03d_%03d", version.getMajor(), version.getMinor()));
+ }
+ catch (Exception ex)
+ {
+ logger.log(Logger.LOG_ERROR, "Exception parsing java version", ex);
+ }
+ }
+
+ public static void initializeJPMS(Properties properties)
{
try
{
@@ -134,7 +187,7 @@ public class Util
{
StringBuilder builder = new StringBuilder();
for (String export : javaExports) {
- builder.append(',').append(export);
+ builder.append(',').append(export).append(";version=\"${felix.detect.java.version}\"");
}
properties.put("felix.detect.jpms.java", builder.toString());
}
@@ -145,14 +198,6 @@ public class Util
{
// Not much we can do - probably not on java9
}
- return properties;
- }
-
- public static String getDefaultProperty(Logger logger, String name)
- {
- Properties props = loadDefaultProperties(logger);
- // Perform variable substitution for property.
- return getPropertyWithSubs(props, name);
}
public static String getPropertyWithSubs(Properties props, String name)
@@ -164,13 +209,7 @@ public class Util
return value;
}
- public static Map<String, String> getDefaultPropertiesWithPrefix(Logger logger, String prefix)
- {
- Properties props = loadDefaultProperties(logger);
- return getDefaultPropertiesWithPrefix(props, prefix);
- }
-
- public static Map<String, String> getDefaultPropertiesWithPrefix(Properties props, String prefix)
+ public static Map<String, String> getPropertiesWithPrefix(Properties props, String prefix)
{
Map<String, String> result = new HashMap<String, String>();
@@ -323,7 +362,7 @@ public class Util
* loaders of any interfaces it implements and the class loaders of
* all super classes.
* </p>
- * @param svcObj the class that is the root of the search.
+ * @param clazz the class that is the root of the search.
* @param name the name of the class to load.
* @return the loaded class or <tt>null</tt> if it could not be
* loaded.
@@ -757,7 +796,7 @@ public class Util
/**
* Checks if the provided module definition declares a fragment host.
*
- * @param module the module to check
+ * @param revision the module to check
* @return <code>true</code> if the module declares a fragment host, <code>false</code>
* otherwise.
*/
Modified: felix/trunk/osgi-r7/framework/src/main/resources/default.properties
URL: http://svn.apache.org/viewvc/felix/trunk/osgi-r7/framework/src/main/resources/default.properties?rev=1828231&r1=1828230&r2=1828231&view=diff
==============================================================================
--- felix/trunk/osgi-r7/framework/src/main/resources/default.properties (original)
+++ felix/trunk/osgi-r7/framework/src/main/resources/default.properties Tue Apr 3 13:03:50 2018
@@ -75,11 +75,6 @@ felix.service.caps=osgi.service; objectC
osgi.service; objectClass:List<String>=org.osgi.service.startlevel.StartLevel; uses:=org.osgi.service.startlevel, \
osgi.service; objectClass:List<String>=org.osgi.service.packageadmin.PackageAdmin; uses:=org.osgi.service.packageadmin
-eecap-jpms=, osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
- osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9", \
- osgi.ee; osgi.ee="JavaSE/compact1"; version:List<Version>="1.8,9", \
- osgi.ee; osgi.ee="JavaSE/compact2"; version:List<Version>="1.8,9", \
- osgi.ee; osgi.ee="JavaSE/compact3"; version:List<Version>="1.8,9"
eecap-1.8=, osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8", \
osgi.ee; osgi.ee="JavaSE/compact1"; version:List<Version>="1.8", \
@@ -102,9 +97,6 @@ eecap-1.2=, osgi.ee; osgi.ee="OSGi/Minim
org.osgi.framework.executionenvironment= \
${dollar}{ee-${dollar}{java.specification.version}} ${dollar}{ee-${dollar}{felix.detect.jpms}}
-ee-jpms=JavaSE-9,JavaSE-1.8,JavaSE-1.7,JavaSE-1.6,J2SE-1.5,J2SE-1.4,J2SE-1.3, \
- J2SE-1.2,JRE-1.1,JRE-1.0,OSGi/Minimum-1.2,OSGi/Minimum-1.1, \
- OSGi/Minimum-1.0
ee-1.8=JavaSE-1.8,JavaSE-1.7,JavaSE-1.6,J2SE-1.5,J2SE-1.4,J2SE-1.3, \
J2SE-1.2,JRE-1.1,JRE-1.0,OSGi/Minimum-1.2,OSGi/Minimum-1.1, \
OSGi/Minimum-1.0
Modified: felix/trunk/osgi-r7/framework/src/test/java/org/apache/felix/framework/ExtensionManagerTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/osgi-r7/framework/src/test/java/org/apache/felix/framework/ExtensionManagerTest.java?rev=1828231&r1=1828230&r2=1828231&view=diff
==============================================================================
--- felix/trunk/osgi-r7/framework/src/test/java/org/apache/felix/framework/ExtensionManagerTest.java (original)
+++ felix/trunk/osgi-r7/framework/src/test/java/org/apache/felix/framework/ExtensionManagerTest.java Tue Apr 3 13:03:50 2018
@@ -26,11 +26,17 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.security.SecureRandom;
import java.util.Arrays;
-import java.util.Collections;
+import java.util.Comparator;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Properties;
+import java.util.Random;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
import java.util.jar.JarOutputStream;
import java.util.jar.Manifest;
import java.util.zip.ZipEntry;
@@ -84,6 +90,7 @@ public class ExtensionManagerTest {
configMap.put(FelixConstants.FRAMEWORK_OS_VERSION, "6.3");
configMap.put(FelixConstants.NATIVE_OS_NAME_ALIAS_PREFIX + ".windows8", "windows 8,win32");
configMap.put(FelixConstants.NATIVE_PROC_NAME_ALIAS_PREFIX + ".x86-64", "amd64,em64t,x86_64");
+ configMap.put(FelixConstants.FRAMEWORK_SYSTEMPACKAGES, "foo");
NativeLibraryClause.initializeNativeAliases(configMap);
ExtensionManager extensionManager = new ExtensionManager(logger,
configMap, null);