RFR: 8336017: Deprecate java.util.logging.LoggingMXBean, its implementation, and accessor method for removal

Kevin Walls kevinw at openjdk.org
Wed Feb 5 16:20:57 UTC 2025


On Wed, 5 Feb 2025 15:51:25 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> java.util.logging.LoggingMXBean and java.util.logging.LogManager::getLoggingMXBean are deprecated since JDK-8139982 in JDK 9.
>> 
>> These deprecations should be uprated to state they are for future removal.
>> 
>> java.util.logging.Logging (implements LoggingMXBean) should also be deprecated for removal.
>
> The implementation of PlatformLoggingMXBean uses reflection to access the LoggingMXBean instance provided by the LogManager. If I am not mistaken what is proposed for removal here is actively used under the hood by the PlatformLoggingMXBean implementation - which means we cannot actually remove it?

Hi @dfuch -

What is proposed here is that java.util.logging.LoggingMXBean should be marked for removal.

Having both PlatformLoggingMXBean and LoggingMXBean in existence is confusing. 

Actual removal is not trivial, as yes the "new" PlatformLoggingMXBean is dependent on the existing LoggingMXBean implementation.

(Looking inside LoggingMXBean and seeing the actual implementations that accesses LogManager is also confusing.)

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23271#issuecomment-2637389915


More information about the core-libs-dev mailing list