changeset 54649:73a87b1aacc2

8222529: sun.jdwp.listenerAddress agent property uses wrong encoding Reviewed-by: sspitsyn, amenkov, clanger, erikj
author rschmelter
date Wed, 17 Apr 2019 01:21:56 -0700
parents 89f2043ee67a
children d9208a660094
files make/lib/Lib-jdk.jdwp.agent.gmk src/jdk.jdwp.agent/share/native/libjdwp/util.c
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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)