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/06/29 14:24:13 UTC
svn commit: r1834684 -
/felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
Author: pauls
Date: Fri Jun 29 14:24:13 2018
New Revision: 1834684
URL: http://svn.apache.org/viewvc?rev=1834684&view=rev
Log:
FELIX-5875: allow org.osgi.framework.os.name et.al. to be given via the framework properties.
Modified:
felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java?rev=1834684&r1=1834683&r2=1834684&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java Fri Jun 29 14:24:13 2018
@@ -4841,9 +4841,6 @@ public class Felix extends BundleImpl im
FelixConstants.FRAMEWORK_VENDOR,
FelixConstants.FRAMEWORK_VENDOR_VALUE);
m_configMutableMap.put(
- FelixConstants.FRAMEWORK_LANGUAGE,
- System.getProperty("user.language"));
- m_configMutableMap.put(
FelixConstants.SUPPORTS_FRAMEWORK_EXTENSION,
ExtensionManager.m_extenderFramework != null ? "true" : "false");
m_configMutableMap.put(
@@ -4857,12 +4854,28 @@ public class Felix extends BundleImpl im
ExtensionManager.m_extenderBoot != null ? "true" : "false");
String s = null;
- s = NativeLibraryClause.normalizeOSName(System.getProperty("os.name"));
- m_configMutableMap.put(FelixConstants.FRAMEWORK_OS_NAME, s);
- s = NativeLibraryClause.normalizeProcessor(System.getProperty("os.arch"));
- m_configMutableMap.put(FelixConstants.FRAMEWORK_PROCESSOR, s);
- m_configMutableMap.put(FelixConstants.FRAMEWORK_OS_VERSION,
- NativeLibraryClause.normalizeOSVersion(System.getProperty("os.version")));
+ if (!m_configMutableMap.containsKey(FelixConstants.FRAMEWORK_OS_NAME))
+ {
+ s = NativeLibraryClause.normalizeOSName(System.getProperty("os.name"));
+ m_configMutableMap.put(FelixConstants.FRAMEWORK_OS_NAME, s);
+ }
+
+ if ( !m_configMutableMap.containsKey(FelixConstants.FRAMEWORK_PROCESSOR))
+ {
+ s = NativeLibraryClause.normalizeProcessor(System.getProperty("os.arch"));
+ m_configMutableMap.put(FelixConstants.FRAMEWORK_PROCESSOR, s);
+ }
+
+ if ( !m_configMutableMap.containsKey(FelixConstants.FRAMEWORK_OS_VERSION))
+ {
+ m_configMutableMap.put(FelixConstants.FRAMEWORK_OS_VERSION,
+ NativeLibraryClause.normalizeOSVersion(System.getProperty("os.version")));
+ }
+ if (!m_configMutableMap.containsKey(FelixConstants.FRAMEWORK_LANGUAGE))
+ {
+ m_configMutableMap.put(FelixConstants.FRAMEWORK_LANGUAGE,
+ System.getProperty("user.language"));
+ }
m_configMutableMap.put(
FelixConstants.FELIX_VERSION_PROPERTY, getFrameworkVersion());