diff options
Diffstat (limited to 'vespajlib/src')
4 files changed, 13 insertions, 6 deletions
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 { } } - |