summaryrefslogtreecommitdiffstats
path: root/vespajlib
diff options
context:
space:
mode:
authorgjoranv <gv@yahooinc.com>2023-07-17 15:12:54 +0200
committergjoranv <gv@yahooinc.com>2023-07-17 15:13:38 +0200
commite82fbac888e8057a8ed0ba6117f8ea0010a4f8b2 (patch)
tree3839b53114c5e5d76d90904c0903734d48df89e9 /vespajlib
parent5eab521da57e93d0e71dec4055a1ef077f8f86f2 (diff)
jdk21: set methods final in vespajlib
+ fix import issues
Diffstat (limited to 'vespajlib')
-rw-r--r--vespajlib/abi-spec.json5
-rw-r--r--vespajlib/src/main/java/com/yahoo/io/GrowableByteBuffer.java12
-rw-r--r--vespajlib/src/main/java/com/yahoo/io/NativeIO.java2
-rw-r--r--vespajlib/src/main/java/com/yahoo/net/URI.java2
-rw-r--r--vespajlib/src/main/java/com/yahoo/tensor/TensorType.java3
5 files changed, 16 insertions, 8 deletions
diff --git a/vespajlib/abi-spec.json b/vespajlib/abi-spec.json
index 76d007dd633..6234ff02a6c 100644
--- a/vespajlib/abi-spec.json
+++ b/vespajlib/abi-spec.json
@@ -419,7 +419,7 @@
"public void <init>(java.lang.String, java.lang.String, int, java.lang.String)",
"public boolean isValid()",
"public java.lang.String getScheme()",
- "public boolean isOpaque()",
+ "public final boolean isOpaque()",
"public java.lang.String getHost()",
"public int getPort()",
"public java.lang.String getRest()",
@@ -1319,7 +1319,8 @@
"superClass" : "java.lang.Object",
"interfaces" : [ ],
"attributes" : [
- "public"
+ "public",
+ "final"
],
"methods" : [
"public void <init>()",
diff --git a/vespajlib/src/main/java/com/yahoo/io/GrowableByteBuffer.java b/vespajlib/src/main/java/com/yahoo/io/GrowableByteBuffer.java
index 479375d6b74..24071f03966 100644
--- a/vespajlib/src/main/java/com/yahoo/io/GrowableByteBuffer.java
+++ b/vespajlib/src/main/java/com/yahoo/io/GrowableByteBuffer.java
@@ -3,7 +3,15 @@ package com.yahoo.io;
import com.yahoo.text.Utf8;
-import java.nio.*;
+import java.nio.BufferOverflowException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.nio.CharBuffer;
+import java.nio.DoubleBuffer;
+import java.nio.FloatBuffer;
+import java.nio.IntBuffer;
+import java.nio.LongBuffer;
+import java.nio.ShortBuffer;
/**
* GrowableByteBuffer encapsulates a ByteBuffer and grows it as needed.
@@ -70,7 +78,7 @@ public class GrowableByteBuffer implements Comparable<GrowableByteBuffer> {
return growFactor;
}
- public void setGrowFactor(float growFactor) {
+ public final void setGrowFactor(float growFactor) {
if (growFactor <= 1.00f) {
throw new IllegalArgumentException("Growth factor must be greater than 1.00f, otherwise buffer will never grow!");
}
diff --git a/vespajlib/src/main/java/com/yahoo/io/NativeIO.java b/vespajlib/src/main/java/com/yahoo/io/NativeIO.java
index 96224cc220c..2c0fa235b6a 100644
--- a/vespajlib/src/main/java/com/yahoo/io/NativeIO.java
+++ b/vespajlib/src/main/java/com/yahoo/io/NativeIO.java
@@ -74,7 +74,7 @@ public class NativeIO {
}
public boolean valid() { return fdField.isInitialized(); }
- public Throwable getError() { return fdField.getError(); }
+ public final Throwable getError() { return fdField.getError(); }
/**
* Will hint the OS that data read so far will not be accessed again and should hence be dropped from the buffer cache.
diff --git a/vespajlib/src/main/java/com/yahoo/net/URI.java b/vespajlib/src/main/java/com/yahoo/net/URI.java
index 36d9d453165..6e3d48c0b6f 100644
--- a/vespajlib/src/main/java/com/yahoo/net/URI.java
+++ b/vespajlib/src/main/java/com/yahoo/net/URI.java
@@ -399,7 +399,7 @@ public class URI implements Cloneable, Comparable<URI> {
*
* @return true if the url is opaque, false if it is hierarchical
*/
- public boolean isOpaque() {
+ public final boolean isOpaque() {
return opaque;
}
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/TensorType.java b/vespajlib/src/main/java/com/yahoo/tensor/TensorType.java
index 57d276f278e..6b010529046 100644
--- a/vespajlib/src/main/java/com/yahoo/tensor/TensorType.java
+++ b/vespajlib/src/main/java/com/yahoo/tensor/TensorType.java
@@ -486,7 +486,7 @@ public class TensorType {
}
- public static class Builder {
+ public static final class Builder {
private final Map<String, Dimension> dimensions = new LinkedHashMap<>();
@@ -614,4 +614,3 @@ public class TensorType {
}
}
-