RFR: 8244855 : Remove unused "getParent" function from Windows jni_util_md.c

Brent Christian brent.christian at oracle.com
Tue May 12 19:04:24 UTC 2020


Hi,

Please review this change to remove the unused "getParent()" function 
from jni_util_md.c on Windows.

https://bugs.openjdk.java.net/browse/JDK-8244855

Automated build+test job is in progress.
The diff is as follows:

diff -r ee4bd700b772 src/java.base/windows/native/libjava/jni_util_md.c
--- a/src/java.base/windows/native/libjava/jni_util_md.c	Tue May 12 
11:20:34 2020 -0700
+++ b/src/java.base/windows/native/libjava/jni_util_md.c	Tue May 12 
12:00:39 2020 -0700
@@ -31,17 +31,6 @@
  #include "jni.h"
  #include "jni_util.h"

-static void getParent(const TCHAR *path, TCHAR *dest) {
-    char* lastSlash = max(strrchr(path, '\\'), strrchr(path, '/'));
-    if (lastSlash == NULL) {
-        *dest = 0;
-        return;
-    }
-    if (path != dest)
-        strcpy(dest, path);
-    *lastSlash = 0;
-}
-
  void* getProcessHandle() {
      return (void*)GetModuleHandle(NULL);
  }

Thanks,
-Brent


More information about the core-libs-dev mailing list