office-gobmx/jvmfwk
Stephan Bergmann 93e234c45c Fix a misuse of two-argument std string_view rfind
...introduced in 655b6c2f46
"loplugin:stringviewparam".  Unlike its O[U]String lastIndexOf(x, n)
counterpart (which looks for the last x whose end position, exclusive, is <= n),
string_view rfind(x, n) looks for the last x whose start position, inclusive, is
<= n.  (So here would have left slash unchanged.)  (And the seemingly simpler

  jvm_dll.rfind('\\', slash - 1)

would fail when slash is zero, as in that case it would call rfind with a second
argument of npos, i.e., search for the last '\\' in the complete jvm_dll.)

Change-Id: I148a5db860d4b9e9d58a4a8847880a7a7020c5a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140486
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-09-23 15:52:21 +02:00
..
distributions/OpenOfficeorg
inc Add loongarch64 support. 2022-08-11 10:53:00 +02:00
plugins/sunmajor Fix a misuse of two-argument std string_view rfind 2022-09-23 15:52:21 +02:00
qa/unit
source try harder to remove "OSL_PIPE" pipe on SIGTERM 2022-09-19 18:28:33 +02:00
CppunitTest_jvmfwk_sunversion.mk
CustomTarget_jreproperties.mk
CustomTarget_jvmfwk_jvmfwk3_ini.mk
Executable_javaldx.mk
IwyuFilter_jvmfwk.yaml
Library_jvmfwk.mk
Makefile
Module_jvmfwk.mk
Package_jreproperties.mk
Package_jvmfwk_jvmfwk3_ini.mk
Package_rcfiles.mk
README.md

JVM Framework Wrappers

Wrappers so you can use all the Java Runtime Environments with their slightly incompatible APIs with more ease.

Used to use an over-engineered "plugin" mechanism although there was only one "plugin", called "sunmajor", that handles all possible JREs.

IMPORTANT: The <updated> element in vmfwk/distributions/OpenOfficeorg/javavendors_*.xml files should only be updated for incompatible changes, not for compatible ones. As stated in the commit message of https://gerrit.libreoffice.org/#/c/69730/ in LibreOffice gerrit:

javavendors_*.xml <updated> should not have been updated...

Changing <updated> causes jfw_startVM and jfw_getSelectedJRE (both jvmfwk/source/framework.cxx) to fail with JFW_E_INVALID_SETTINGS, which in turn causes functionality that requires a JVM to issue a GUI error dialog stating that the user must select a new JRE in the Options dialog. While that behavior makes sense if a JRE was selected that would no longer be supported by the modified javavendors_*.xml, it is just annoying if an already selected JRE is still supported. And a compatible change to javavendors_*.xml implies that an already selected JRE will still be supported."