8243154: Fix deprecation warnings in failure handler
Reviewed-by: dholmes
This commit is contained in:
parent
ec1c111c6c
commit
e8dfd8ce54
@ -52,7 +52,7 @@ $(eval $(call SetupJavaCompilation, BUILD_FAILURE_HANDLER, \
|
|||||||
SETUP := GENERATE_OLDBYTECODE, \
|
SETUP := GENERATE_OLDBYTECODE, \
|
||||||
SRC := $(FH_BASEDIR)/src/share/classes $(FH_BASEDIR)/src/share/conf, \
|
SRC := $(FH_BASEDIR)/src/share/classes $(FH_BASEDIR)/src/share/conf, \
|
||||||
BIN := $(FH_SUPPORT)/classes, \
|
BIN := $(FH_SUPPORT)/classes, \
|
||||||
DISABLED_WARNINGS := deprecation serial try, \
|
DISABLED_WARNINGS := serial try, \
|
||||||
COPY := .properties, \
|
COPY := .properties, \
|
||||||
CLASSPATH := $(JTREG_JAR) $(TOOLS_JAR), \
|
CLASSPATH := $(JTREG_JAR) $(TOOLS_JAR), \
|
||||||
JAR := $(FH_JAR), \
|
JAR := $(FH_JAR), \
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -111,7 +111,7 @@ public class GatherProcessInfoTimeoutHandler extends TimeoutHandler {
|
|||||||
if (HAS_NATIVE_LIBRARY && "windows".equals(OS.current().family)) {
|
if (HAS_NATIVE_LIBRARY && "windows".equals(OS.current().family)) {
|
||||||
try {
|
try {
|
||||||
Field field = process.getClass().getDeclaredField("handle");
|
Field field = process.getClass().getDeclaredField("handle");
|
||||||
boolean old = field.isAccessible();
|
boolean old = field.canAccess(process);
|
||||||
try {
|
try {
|
||||||
field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
long handle = field.getLong(process);
|
long handle = field.getLong(process);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -86,7 +86,7 @@ public final class ValueHandler {
|
|||||||
delimiter = delimiter == null ? " " : delimiter;
|
delimiter = delimiter == null ? " " : delimiter;
|
||||||
Class<? extends ValueParser> parserClass = property.parser();
|
Class<? extends ValueParser> parserClass = property.parser();
|
||||||
try {
|
try {
|
||||||
field.set(object, parserClass.newInstance().parse(
|
field.set(object, parserClass.getDeclaredConstructor().newInstance().parse(
|
||||||
field.getType(), value, delimiter));
|
field.getType(), value, delimiter));
|
||||||
} catch (ReflectiveOperationException | IllegalArgumentException e) {
|
} catch (ReflectiveOperationException | IllegalArgumentException e) {
|
||||||
throw new InvalidValueException(
|
throw new InvalidValueException(
|
||||||
|
Loading…
Reference in New Issue
Block a user