From ff104658d67c19f64558632d0e6dc60865f3dbdc Mon Sep 17 00:00:00 2001 From: Egor Ushakov Date: Tue, 9 Apr 2019 11:35:16 +0300 Subject: [PATCH] JBR-1354 com/sun/tools/attach/PermissionTest.java: access denied ("java.util.PropertyPermission" "sun.tools.attach.tmp.only" "read") (cherry picked from commit 3a09f6c1dbeab41c4b2fd6b789b3c462dda37981) --- .../classes/sun/tools/attach/HotSpotVirtualMachine.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java b/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java index d1d1d72bf452..f107b6298031 100644 --- a/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java +++ b/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java @@ -499,6 +499,10 @@ protected static void checkNulls(Object... args) { } boolean attachOnlyInTmp() { - return Boolean.getBoolean("sun.tools.attach.tmp.only"); + try { + return Boolean.getBoolean("sun.tools.attach.tmp.only"); + } catch (Exception e) { + return false; + } } }