From 2256b293ab28a052f63fc4ad02b372074e821848 Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Wed, 8 Nov 2023 08:07:31 +0000 Subject: [PATCH] classlib: fix missing .shift() in ReferenceQueue.poll (#852) --- .../org/teavm/classlib/java/lang/ref/ReferenceQueue.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classlib/src/main/resources/org/teavm/classlib/java/lang/ref/ReferenceQueue.js b/classlib/src/main/resources/org/teavm/classlib/java/lang/ref/ReferenceQueue.js index 11aeeabc4..4574ad2b9 100644 --- a/classlib/src/main/resources/org/teavm/classlib/java/lang/ref/ReferenceQueue.js +++ b/classlib/src/main/resources/org/teavm/classlib/java/lang/ref/ReferenceQueue.js @@ -28,6 +28,6 @@ function init() { } function poll() { - var value = this[teavm_javaField("java.lang.ref.ReferenceQueue", "inner")]; + var value = this[teavm_javaField("java.lang.ref.ReferenceQueue", "inner")].shift(); return typeof value !== 'undefined' ? value : null; } \ No newline at end of file