Skip to content

Commit

Permalink
Merge pull request #11796 from babsingh/depr_ref_isenqueued
Browse files Browse the repository at this point in the history
Reference.isEnqueued() deprecated since Java 16
  • Loading branch information
pshipton committed Jan 27, 2021
2 parents 8935eed + 59f37a8 commit 091d2c3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions jcl/src/java.base/share/classes/java/lang/ref/Reference.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*[INCLUDE-IF Sidecar16]*/
/*******************************************************************************
* Copyright (c) 1998, 2020 IBM Corp. and others
* Copyright (c) 1998, 2021 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -163,7 +163,14 @@ public T get() {
* Return whether the reference object has been enqueued.
*
* @return true if Reference has been enqueued, false otherwise.
*/
/*[IF JAVA_SPEC_VERSION >= 16]
*
* @deprecated Use ReferenceQueue or Reference.refersTo(null).
/*[ENDIF] JAVA_SPEC_VERSION >= 16
*/
/*[IF JAVA_SPEC_VERSION >= 16]*/
@Deprecated(since="16")
/*[ENDIF] JAVA_SPEC_VERSION >= 16 */
public boolean isEnqueued () {
synchronized(this) {
return state == STATE_ENQUEUED;
Expand Down

0 comments on commit 091d2c3

Please sign in to comment.