[Libreoffice-commits] core.git: desktop/unx jvmfwk/plugins

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Thu Jul 2 14:53:28 UTC 2020


 desktop/unx/source/start.c                       |    4 +++-
 jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx |    1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 269a161b3855fcdfde084bd0d786f212cbdd2af0
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Jul 2 13:36:03 2020 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Jul 2 16:52:41 2020 +0200

    tdf#129264: Make javaldx always print a line upon successful execution
    
    ...where "do not use a JRE" (implying that the printed line consists of just a
    terminating newline) is a sufficient condition for a successful execution, too.
    
    (Also, it appears that extend_library_path in desktop/unx/source/start.c would
    have introduced unwanted empty segments into the path environment variable when
    the line printed by javaldx consisted of just a terminating newline.)
    
    Change-Id: Ic2f86de8a829b3dea51c0e4da1ac236298e16366
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97756
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index f95cfe4d1eaa..76f3adcb6e9c 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -700,7 +700,9 @@ static void exec_javaldx(Args *args)
             *chomp = '\0';
     }
 
-    extend_library_path(newpath);
+    if (newpath[0] != '\0') {
+        extend_library_path(newpath);
+    }
 
     if (javaldx)
         osl_freeProcessHandle(javaldx);
diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
index f7c295ec1728..3e8acd674626 100644
--- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
+++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
@@ -59,6 +59,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
         if (errcode == JFW_E_NONE && !bEnabled)
         {
                 //Do not do any preparation because that may only slow startup time.
+            fprintf(stdout, "\n");
             return 0;
         }
         else if (errcode != JFW_E_NONE && errcode != JFW_E_DIRECT_MODE)


More information about the Libreoffice-commits mailing list