src/java.base/share/native/libjli/java.c
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 55080 ef713640430e
child 58679 9c3209ff7550
--- a/src/java.base/share/native/libjli/java.c	Thu Oct 17 20:27:44 2019 +0100
+++ b/src/java.base/share/native/libjli/java.c	Thu Oct 17 20:53:35 2019 +0100
@@ -338,9 +338,6 @@
     /* Set the -Dsun.java.launcher pseudo property */
     SetJavaLauncherProp();
 
-    /* set the -Dsun.java.launcher.* platform properties */
-    SetJavaLauncherPlatformProps();
-
     return JVMInit(&ifn, threadStackSize, argc, argv, mode, what, ret);
 }
 /*
@@ -1169,13 +1166,13 @@
      * Passing on splash screen info in environment variables
      */
     if (splash_file_name && !headlessflag) {
-        char* splash_file_entry = JLI_MemAlloc(JLI_StrLen(SPLASH_FILE_ENV_ENTRY "=")+JLI_StrLen(splash_file_name)+1);
+        splash_file_entry = JLI_MemAlloc(JLI_StrLen(SPLASH_FILE_ENV_ENTRY "=")+JLI_StrLen(splash_file_name)+1);
         JLI_StrCpy(splash_file_entry, SPLASH_FILE_ENV_ENTRY "=");
         JLI_StrCat(splash_file_entry, splash_file_name);
         putenv(splash_file_entry);
     }
     if (splash_jar_name && !headlessflag) {
-        char* splash_jar_entry = JLI_MemAlloc(JLI_StrLen(SPLASH_JAR_ENV_ENTRY "=")+JLI_StrLen(splash_jar_name)+1);
+        splash_jar_entry = JLI_MemAlloc(JLI_StrLen(SPLASH_JAR_ENV_ENTRY "=")+JLI_StrLen(splash_jar_name)+1);
         JLI_StrCpy(splash_jar_entry, SPLASH_JAR_ENV_ENTRY "=");
         JLI_StrCat(splash_jar_entry, splash_jar_name);
         putenv(splash_jar_entry);
@@ -2246,6 +2243,11 @@
     if (file_name == NULL){
         return;
     }
+
+    if (!DoSplashInit()) {
+        goto exit;
+    }
+
     maxScaledImgNameLength = DoSplashGetScaledImgNameMaxPstfixLen(file_name);
 
     scaled_splash_name = JLI_MemAlloc(
@@ -2266,13 +2268,13 @@
                             jar_name, file_name, &data_size);
         }
         if (image_data) {
-            DoSplashInit();
             DoSplashSetScaleFactor(scale_factor);
             DoSplashLoadMemory(image_data, data_size);
             JLI_MemFree(image_data);
+        } else {
+            DoSplashClose();
         }
     } else {
-        DoSplashInit();
         if (isImageScaled) {
             DoSplashSetScaleFactor(scale_factor);
             DoSplashLoadFile(scaled_splash_name);
@@ -2284,6 +2286,7 @@
 
     DoSplashSetFileJarName(file_name, jar_name);
 
+    exit:
     /*
      * Done with all command line processing and potential re-execs so
      * clean up the environment.