From 49e1a69445f8c969ec2f418a194065a907f74b45 Mon Sep 17 00:00:00 2001 From: Arne Babenhauserheide Date: Sun, 18 Feb 2024 10:01:53 +0100 Subject: [PATCH] Java 21 fix: int used as return type but integer required --- src/freenet/support/SortedIntSet.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/freenet/support/SortedIntSet.java b/src/freenet/support/SortedIntSet.java index 883793d606c..1af4b7d57dc 100644 --- a/src/freenet/support/SortedIntSet.java +++ b/src/freenet/support/SortedIntSet.java @@ -48,7 +48,7 @@ public synchronized int size() { * * @return the smallest item, or -1 if the set is empty */ - public synchronized int getFirst() { + public synchronized Integer getFirst() { return data.isEmpty() ? -1 : data.get(0); } @@ -57,7 +57,7 @@ public synchronized int getFirst() { * * @return the largest item, or -1 if the set is empty */ - public synchronized int getLast() { + public synchronized Integer getLast() { return data.isEmpty() ? -1 : data.get(data.size() - 1); } @@ -149,7 +149,7 @@ private synchronized void push(int num, int x) { * * @return the smallest item */ - public int removeFirst() { + public Integer removeFirst() { int val = getFirst(); remove(val); return val;