8327793: Deprecate jstatd for removal
Reviewed-by: alanb, cjplummer
This commit is contained in:
parent
dbf5a9a400
commit
9f8de221d7
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2024, 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
|
||||
@ -32,6 +32,7 @@
|
||||
* @moduleGraph
|
||||
* @since 9
|
||||
*/
|
||||
@Deprecated(since="24", forRemoval=true)
|
||||
module jdk.jstatd {
|
||||
requires java.rmi;
|
||||
requires jdk.internal.jvmstat;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2024, 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
|
||||
@ -80,6 +80,8 @@ public class Jstatd {
|
||||
int rmiPort = 0;
|
||||
int argc = 0;
|
||||
|
||||
System.err.println("WARNING: jstatd is deprecated and will be removed in a future release.");
|
||||
|
||||
for ( ; (argc < args.length) && (args[argc].startsWith("-")); argc++) {
|
||||
String arg = args[argc];
|
||||
|
||||
|
@ -356,7 +356,7 @@ public final class JstatdTest {
|
||||
OutputAnalyzer output = jstatdThread.getOutput();
|
||||
List<String> stdout = output.asLinesWithoutVMWarnings();
|
||||
output.reportDiagnosticSummary();
|
||||
assertEquals(stdout.size(), 1, "Output should contain one line");
|
||||
assertEquals(stdout.size(), 2, "Output should contain two lines"); // includes deprecation warning
|
||||
assertTrue(stdout.get(0).startsWith("jstatd started"), "List should start with 'jstatd started'");
|
||||
assertNotEquals(output.getExitValue(), 0,
|
||||
"jstatd process exited with unexpected exit code");
|
||||
|
Loading…
Reference in New Issue
Block a user