[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - 2 commits - jvmfwk/plugins

Stephan Bergmann sbergman at redhat.com
Tue Jun 26 14:43:02 UTC 2018


 jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx     |    3 ++-
 jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx |    7 ++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 4b0844f41f8cd18c63c61dfe24ca7b841acd1f3f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Aug 28 18:18:12 2017 +0200

    tdf#100501: Fix thinko
    
    ...in previous 52ffad9bb7be800790de6d918154dbeade88cadd "tdf#100501: Adapt to
    Java 9 (at least on Linux x86-64)"
    
    Change-Id: I4d6bc31e0a7051a2657bb3d1ffc20c7a03d69038
    (cherry picked from commit cda4cea7cdfc9a8de814b901b3b957f029d36aaf)

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
index bc53497dc566..2aedaa29938c 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
@@ -96,7 +96,7 @@ bool SunVersion::init(const char *szVersion)
                 //prevent 1.4.0. 1.4.0-
                 pCur + 1 != pEnd || isdigit(*(pCur))) )
         {
-            bool afterMaint = pCur != pEnd && (*pCur == '_' || *pCur == '-');
+            bool afterMaint = pCur == pEnd || *pCur == '_' || *pCur == '-';
 
             int len = pCur - pLast;
             if (len >= 127)
commit 3a0d0a3ecf170e965a2b52ab15274cb071e24819
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Aug 28 15:35:43 2017 +0200

    tdf#100501: Adapt to Java 9 (at least on Linux x86-64)
    
    Checking with both jdk-9+181_linux-x64_bin.tar.gz and
    jre-9+181_linux-x64_bin.tar.gz as currently available at
    <http://jdk.java.net/9/> "JDK 9 Early-Access Builds":
    
    For one, make SunVersion::init understand <http://openjdk.java.net/jeps/223>
    "JEP 223: New Version-String Scheme" at least insofar as to accept strings like
    "9" with less than three dot-separated segments (where the missing segments are
    treated like "0").
    
    For another, at least for Linux x86-64, libjvm.so is now apparently located in a
    path without an "amd64" architecture segment, "lib/server/libjvm.so".  (But
    could that also be "client"?)  Other platforms may need further adjustments.
    
    Change-Id: Idcebc833472c81a1dc74dcdd481b0a37274a8713
    (cherry picked from commit 52ffad9bb7be800790de6d918154dbeade88cadd)

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx
index 7f7c4943c8be..7543f497eb83 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx
@@ -68,7 +68,8 @@ char const* const* SunInfo::getRuntimePaths(int * size)
         "/lib/" JFW_PLUGIN_ARCH "/client/libjvm.so",
         "/lib/" JFW_PLUGIN_ARCH "/server/libjvm.so",
         "/lib/" JFW_PLUGIN_ARCH "/classic/libjvm.so",
-        "/lib/" JFW_PLUGIN_ARCH "/jrockit/libjvm.so"
+        "/lib/" JFW_PLUGIN_ARCH "/jrockit/libjvm.so",
+        "/lib/server/libjvm.so"
 #endif
     };
     *size = SAL_N_ELEMENTS(ar);
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
index b4ad7019d449..bc53497dc566 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
@@ -88,7 +88,7 @@ bool SunVersion::init(const char *szVersion)
             ! (nPartPos == 0) // prevents: ".4.1", "..1", part must start with digit
             && (
                 //separators after maintenance (1.4.1_01, 1.4.1-beta, or 1.4.1)
-                ((pCur == pEnd || *pCur == '_' || *pCur == '-') && (nPart == 2 ))
+                (pCur == pEnd || *pCur == '_' || *pCur == '-')
                 ||
                 //separators between major-minor and minor-maintenance
                 (nPart < 2 && *pCur == '.') )
@@ -96,6 +96,8 @@ bool SunVersion::init(const char *szVersion)
                 //prevent 1.4.0. 1.4.0-
                 pCur + 1 != pEnd || isdigit(*(pCur))) )
         {
+            bool afterMaint = pCur != pEnd && (*pCur == '_' || *pCur == '-');
+
             int len = pCur - pLast;
             if (len >= 127)
                 return false;
@@ -106,6 +108,9 @@ bool SunVersion::init(const char *szVersion)
             pLast = pCur;
 
             m_arVersionParts[nPart] = atoi(buf);
+
+            if (afterMaint)
+                nPart = 2;
             nPart ++;
             nPartPos = 0;
             if (nPart == 3)


More information about the Libreoffice-commits mailing list