summaryrefslogtreecommitdiff
path: root/jvmfwk/plugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-03-15 12:17:30 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-03-15 13:46:06 +0100
commit8e6462571bb4cb872f607b4ac9dfde7f43b79ac3 (patch)
treeec4927534b7b7877565679aa3bbac1954017679d /jvmfwk/plugins
parent25fee1f66ba42c0b6828409bfd2c2e822c1f7eb6 (diff)
Allow for java.version consisting of four dotted segments
...like "11.0.14.1" reported now by java-11-openjdk-headless-11.0.14.1.1-5.fc35.x86_64, and which caused > warn:jfw:274674:274674:jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx:100: [Java framework] sunjavaplugin.so does not know the version: 11.0.14.1 as valid for a SUN/Oracle JRE. (For simplicity, cover it with the same code block that already covers a potential "_01" etc. part following the official(?) three dotted segments.) Change-Id: Id98235d3be59653ab412f9b6c1ffbf3b0470bd6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131586 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'jvmfwk/plugins')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
index 490d5febbea4..16a1e14f3662 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
@@ -72,8 +72,8 @@ bool SunVersion::init(const char *szVersion)
//separators after maintenance (1.4.1_01, 1.4.1-beta, or 1.4.1)
(pCur == pEnd || *pCur == '_' || *pCur == '-')
||
- //separators between major-minor and minor-maintenance
- (nPart < 2 && *pCur == '.') )
+ //separators between major-minor and minor-maintenance (or fourth segment)
+ (nPart < 3 && *pCur == '.') )
&& (
//prevent 1.4.0. 1.4.0-
pCur + 1 != pEnd
@@ -113,10 +113,10 @@ bool SunVersion::init(const char *szVersion)
}
if (pCur >= pEnd)
return true;
- //We have now 1.4.1. This can be followed by _01, -beta, etc.
+ //We have now 1.4.1. This can be followed by _01 (or a fourth segment .1), -beta, etc.
// _01 (update) According to docu must not be followed by any other
//characters, but on Solaris 9 we have a 1.4.1_01a!!
- if (* (pCur - 1) == '_')
+ if (* (pCur - 1) == '_' || *(pCur - 1) == '.')
{// _01, _02
// update is the last part _01, _01a, part 0 is the digits parts and 1 the trailing alpha
while (true)