diff --git a/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java b/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java index 20914a0db435f..4db1af8d38ffb 100644 --- a/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java +++ b/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023, 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 @@ -1445,24 +1445,7 @@ synchronized ObjectReferenceImpl objectMirror(long id, int tag) { return object; } - synchronized void removeObjectMirror(ObjectReferenceImpl object) { - // Handle any queue elements that are not strongly reachable - processQueue(); - - SoftObjectReference ref = objectsByID.remove(object.ref()); - if (ref != null) { - batchForDispose(ref); - } else { - /* - * If there's a live ObjectReference about, it better be part - * of the cache. - */ - throw new InternalException("ObjectReference " + object.ref() + - " not found in object cache"); - } - } - - synchronized void removeObjectMirror(SoftObjectReference ref) { + private synchronized void removeObjectMirror(SoftObjectReference ref) { /* * This will remove the soft reference if it has not been * replaced in the cache.