8344252: SM cleanup in java.util classes

Reviewed-by: naoto, smarks
This commit is contained in:
Roger Riggs 2024-11-15 20:29:14 +00:00
parent 59ffac84d3
commit c5b6ed8ca0
13 changed files with 160 additions and 330 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 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
@ -26,9 +26,6 @@ package java.util;
import sun.util.logging.PlatformLogger;
import java.security.AccessController;
import java.security.PrivilegedAction;
/**
* Utility class for detecting inadvertent uses of boxing in
* {@code java.util} classes. The detection is turned on or off based on
@ -49,9 +46,7 @@ final class Tripwire {
private static final String TRIPWIRE_PROPERTY = "org.openjdk.java.util.stream.tripwire";
/** Should debugging checks be enabled? */
@SuppressWarnings("removal")
static final boolean ENABLED = AccessController.doPrivileged(
(PrivilegedAction<Boolean>) () -> Boolean.getBoolean(TRIPWIRE_PROPERTY));
static final boolean ENABLED = Boolean.getBoolean(TRIPWIRE_PROPERTY);
private Tripwire() { }