Skip to content

Commit

Permalink
8336017: Deprecate java.util.logging.LoggingMXBean, its implementatio…
Browse files Browse the repository at this point in the history
…n, and accessor method for removal
  • Loading branch information
kevinjwalls committed Jan 23, 2025
1 parent c00557f commit 395f7df
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
11 changes: 6 additions & 5 deletions src/java.logging/share/classes/java/util/logging/LogManager.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, 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
Expand Down Expand Up @@ -2406,16 +2406,17 @@ private void setLevelsOnExistingLoggers() {
* @return a {@link LoggingMXBean} object.
*
* @deprecated {@code java.util.logging.LoggingMXBean} is deprecated and
* replaced with {@code java.lang.management.PlatformLoggingMXBean}. Use
* {@link java.management/java.lang.management.ManagementFactory#getPlatformMXBean(Class)
* replaced with {@code java.lang.management.PlatformLoggingMXBean}.
* This method will be removed.
* Use {@link java.management/java.lang.management.ManagementFactory#getPlatformMXBean(Class)
* ManagementFactory.getPlatformMXBean}(PlatformLoggingMXBean.class)
* instead.
*
* @see java.management/java.lang.management.PlatformLoggingMXBean
* @since 1.5
*/
@Deprecated(since="9")
@SuppressWarnings("doclint:reference")
@Deprecated(since="9", forRemoval=true)
@SuppressWarnings({"doclint:reference", "removal"})
public static synchronized LoggingMXBean getLoggingMXBean() {
return Logging.getInstance();
}
Expand Down
5 changes: 3 additions & 2 deletions src/java.logging/share/classes/java/util/logging/Logging.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2025, 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
Expand Down Expand Up @@ -44,7 +44,8 @@
* @see Logger
* @see LogManager
*/
@SuppressWarnings("deprecation") // implements LoggingMXBean
@Deprecated(since="25", forRemoval=true)
@SuppressWarnings("removal") // implements LoggingMXBean
final class Logging implements LoggingMXBean {

private static LogManager logManager = LogManager.getLogManager();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2025, 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
Expand Down Expand Up @@ -43,15 +43,15 @@
* with {@link java.management/java.lang.management.PlatformLoggingMXBean}.
* It will not register in the platform {@code MBeanServer}.
* Use {@code ManagementFactory.getPlatformMXBean(PlatformLoggingMXBean.class)}
* instead.
* instead. This class will be removed.
*
* @author Ron Mann
* @author Mandy Chung
* @since 1.5
*
* @see java.management/java.lang.management.PlatformLoggingMXBean
*/
@Deprecated(since="9")
@Deprecated(since="9", forRemoval=true)
@SuppressWarnings("doclint:reference")
public interface LoggingMXBean {

Expand Down

0 comments on commit 395f7df

Please sign in to comment.