diff options
author | Jon Bratseth <bratseth@vespa.ai> | 2023-04-17 13:42:05 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@vespa.ai> | 2023-04-17 13:42:05 +0200 |
commit | 2e2d9c57a39425273d12b49183b55b46b5c680b2 (patch) | |
tree | a43c07e48fa822c1c9330cdf3edd64cbfa2cbf4e /vespajlib | |
parent | b66f35888ad413800ac16f841582da5bf067cb7f (diff) |
Build with jdk20
Diffstat (limited to 'vespajlib')
3 files changed, 2 insertions, 60 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/slime/BinaryEncoder.java b/vespajlib/src/main/java/com/yahoo/slime/BinaryEncoder.java index f12496f7a76..e0b4fb2c672 100644 --- a/vespajlib/src/main/java/com/yahoo/slime/BinaryEncoder.java +++ b/vespajlib/src/main/java/com/yahoo/slime/BinaryEncoder.java @@ -28,7 +28,7 @@ final class BinaryEncoder implements ArrayTraverser, ObjectSymbolTraverser { byte next = (byte)(value & 0x7f); value >>>= 7; // unsigned shift while (value != 0) { - next |= 0x80; + next |= (byte)0x80; out.put(next); next = (byte)(value & 0x7f); value >>>= 7; diff --git a/vespajlib/src/main/java/com/yahoo/tensor/functions/ReduceJoin.java b/vespajlib/src/main/java/com/yahoo/tensor/functions/ReduceJoin.java index 11996b6a23d..de1c30e6414 100644 --- a/vespajlib/src/main/java/com/yahoo/tensor/functions/ReduceJoin.java +++ b/vespajlib/src/main/java/com/yahoo/tensor/functions/ReduceJoin.java @@ -333,7 +333,7 @@ public class ReduceJoin<NAMETYPE extends Name> extends CompositeTensorFunction<N private final long[] bounds; private final long[] iterator; - private int remaining; + private long remaining; MultiDimensionIterator(TensorType type) { bounds = new long[type.dimensions().size()]; diff --git a/vespajlib/src/test/java/com/yahoo/io/FatalErrorHandlerTestCase.java b/vespajlib/src/test/java/com/yahoo/io/FatalErrorHandlerTestCase.java deleted file mode 100644 index dab91b6a995..00000000000 --- a/vespajlib/src/test/java/com/yahoo/io/FatalErrorHandlerTestCase.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.io; - -import static org.junit.Assert.*; - -import java.security.Permission; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Just to remove noise from the coverage report. - * - * @author Steinar Knutsen - */ -public class FatalErrorHandlerTestCase { - @SuppressWarnings("removal") - private static final class AvoidExiting extends SecurityManager { - - @Override - public void checkPermission(Permission perm) { - } - - @Override - public void checkExit(int status) { - throw new SecurityException(); - } - - } - - private FatalErrorHandler h; - - @Before - @SuppressWarnings("removal") - public void setUp() throws Exception { - h = new FatalErrorHandler(); - System.setSecurityManager(new AvoidExiting()); - } - - @After - @SuppressWarnings("removal") - public void tearDown() throws Exception { - System.setSecurityManager(null); - } - - @Test - public final void testHandle() { - boolean caught = false; - try { - h.handle(new Throwable(), "abc"); - } catch (SecurityException e) { - caught = true; - } - assertTrue(caught); - } - -} |