8222529: sun.jdwp.listenerAddress agent property uses wrong encoding
authorrschmelter
Wed, 17 Apr 2019 01:21:56 -0700
changeset 54649 73a87b1aacc2
parent 54648 89f2043ee67a
child 54650 d9208a660094
8222529: sun.jdwp.listenerAddress agent property uses wrong encoding Reviewed-by: sspitsyn, amenkov, clanger, erikj
make/lib/Lib-jdk.jdwp.agent.gmk
src/jdk.jdwp.agent/share/native/libjdwp/util.c
--- a/make/lib/Lib-jdk.jdwp.agent.gmk	Tue Apr 30 11:58:30 2019 +0530
+++ b/make/lib/Lib-jdk.jdwp.agent.gmk	Wed Apr 17 01:21:56 2019 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -66,6 +66,7 @@
     LIBS_solaris := $(LIBDL), \
     LIBS_macosx := -liconv, \
     LIBS_aix := -liconv, \
+    LIBS_windows := $(WIN_JAVA_LIB), \
 ))
 
 $(BUILD_LIBJDWP): $(call FindLib, java.base, java)
--- a/src/jdk.jdwp.agent/share/native/libjdwp/util.c	Tue Apr 30 11:58:30 2019 +0530
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/util.c	Wed Apr 17 01:21:56 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1673,7 +1673,7 @@
     /* Create jstrings for property name and value */
     nameString = JNI_FUNC_PTR(env,NewStringUTF)(env, propertyName);
     if (nameString != NULL) {
-        valueString = JNI_FUNC_PTR(env,NewStringUTF)(env, propertyValue);
+        valueString = JNU_NewStringPlatform(env, propertyValue);
         if (valueString != NULL) {
             /* invoke Properties.setProperty */
             JNI_FUNC_PTR(env,CallObjectMethod)