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 2020/03/31 22:37:09 UTC
[felix-dev] branch connect updated: Fix some smaller bugs that
affected android.
This is an automated email from the ASF dual-hosted git repository.
pauls pushed a commit to branch connect
in repository https://gitbox.apache.org/repos/asf/felix-dev.git
The following commit(s) were added to refs/heads/connect by this push:
new 9fa4d0e Fix some smaller bugs that affected android.
9fa4d0e is described below
commit 9fa4d0e1beb82144f7b66d4c4b614c3626c049e8
Author: Karl Pauls <kp...@adobe.com>
AuthorDate: Wed Apr 1 00:36:53 2020 +0200
Fix some smaller bugs that affected android.
---
.../main/java/org/apache/felix/framework/cache/ConnectRevision.java | 4 +++-
framework/src/main/java/org/apache/felix/framework/util/Util.java | 6 +++---
framework/src/main/resources/default.properties | 4 ++--
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/framework/src/main/java/org/apache/felix/framework/cache/ConnectRevision.java b/framework/src/main/java/org/apache/felix/framework/cache/ConnectRevision.java
index 9b165cf..94b3284 100644
--- a/framework/src/main/java/org/apache/felix/framework/cache/ConnectRevision.java
+++ b/framework/src/main/java/org/apache/felix/framework/cache/ConnectRevision.java
@@ -65,7 +65,9 @@ public class ConnectRevision extends BundleArchiveRevision
return (Map) m_module.getHeaders().orElseGet(() -> m_module.getEntry("META-INF/MANIFEST.MF").flatMap(entry -> {
try
{
- return Optional.of((Map<String, String>) (Map) BundleCache.getMainAttributes(new StringMap(), entry.getInputStream(), entry.getContentLength()));
+ byte[] manifest = entry.getBytes();
+
+ return Optional.of((Map<String, String>) (Map) BundleCache.getMainAttributes(new StringMap(), new java.io.ByteArrayInputStream(manifest), manifest.length));
}
catch (Exception e)
{
diff --git a/framework/src/main/java/org/apache/felix/framework/util/Util.java b/framework/src/main/java/org/apache/felix/framework/util/Util.java
index d92bb1b..46e6649 100644
--- a/framework/src/main/java/org/apache/felix/framework/util/Util.java
+++ b/framework/src/main/java/org/apache/felix/framework/util/Util.java
@@ -154,11 +154,11 @@ public class Util
properties.put("felix.detect.jpms", "jpms");
}
- properties.put("felix.detect.java.specification.version", version.getMajor() < 9 ? ("1." + (version.getMinor() > 6 ? version.getMinor() : 6)) : Integer.toString(version.getMajor()));
+ properties.put("felix.detect.java.specification.version", version.getMajor() < 9 ? ("1." + (version.getMinor() > 6 ? version.getMinor() < 8 ? version.getMinor() : 8 : 6)) : Integer.toString(version.getMajor()));
if (version.getMajor() < 9)
{
- properties.put("felix.detect.java.version", String.format("0.0.0.JavaSE_001_%03d", version.getMinor() > 6 ? version.getMinor() : 6));
+ properties.put("felix.detect.java.version", String.format("0.0.0.JavaSE_001_%03d", version.getMinor() > 6 ? version.getMinor() < 8 ? version.getMinor() : 8 : 6));
}
else
{
@@ -1066,4 +1066,4 @@ public class Util
{
return map == null || map.isEmpty() ? EMPTY_MAP : Collections.unmodifiableMap(map);
}
-}
\ No newline at end of file
+}
diff --git a/framework/src/main/resources/default.properties b/framework/src/main/resources/default.properties
index fc7163e..e2396ba 100644
--- a/framework/src/main/resources/default.properties
+++ b/framework/src/main/resources/default.properties
@@ -21,7 +21,7 @@
# New-style generic execution environment capabilities.
org.osgi.framework.system.capabilities= \
- ${dollar}{felix.service.caps} ${dollar}{eecap-${dollar}{java.specification.version}} ${dollar}{eecap-${dollar}{felix.detect.jpms}}
+ ${dollar}{felix.service.caps} ${dollar}{eecap-${dollar}{felix.detect.java.specification.version}} ${dollar}{eecap-${dollar}{felix.detect.jpms}}
# Native Processor Aliases. Format is felix.native.processor.alias.<normalized Processor Name>=alias1,alias2
felix.native.processor.alias.68k=
@@ -87,7 +87,7 @@ eecap-1.6=, osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2"
# Deprecated old-style execution environment properties.
org.osgi.framework.executionenvironment= \
- ${dollar}{ee-${dollar}{java.specification.version}} ${dollar}{ee-${dollar}{felix.detect.jpms}}
+ ${dollar}{ee-${dollar}{felix.detect.java.specification.version}} ${dollar}{ee-${dollar}{felix.detect.jpms}}
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, \