Skip to content

Commit 9478838

Browse files
committed
test: Remove outdated spotbugs warning suppressions
1 parent 1ad46eb commit 9478838

File tree

52 files changed

+71
-160
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+71
-160
lines changed

junixsocket-common/src/test/java/org/newsclub/net/unix/AcceptTimeoutTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import org.junit.jupiter.api.Test;
3838
import org.opentest4j.AssertionFailedError;
3939

40-
import com.kohlschutter.annotations.compiletime.SuppressFBWarnings;
4140
import com.kohlschutter.testutil.TestAbortedWithImportantMessageException;
4241
import com.kohlschutter.testutil.TestAbortedWithImportantMessageException.MessageType;
4342
import com.kohlschutter.testutil.TestAsyncUtil;
@@ -48,8 +47,6 @@
4847
*
4948
* @author Christian Kohlschütter
5049
*/
51-
@SuppressFBWarnings({
52-
"THROWS_METHOD_THROWS_CLAUSE_THROWABLE", "THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION"})
5350
public abstract class AcceptTimeoutTest<A extends SocketAddress> extends SocketTestBase<A> {
5451
private static final int TIMING_INACCURACY_MILLIS = 5000;
5552

@@ -90,7 +87,6 @@ public void testCatchTimeout() throws Exception {
9087

9188
@Test
9289
@SuppressWarnings({"PMD.CognitiveComplexity", "PMD.ExcessiveMethodLength"})
93-
@SuppressFBWarnings("NP_NONNULL_PARAM_VIOLATION")
9490
public void testTimeoutAfterDelay() throws Exception {
9591
final int timeoutMillis = 5000;
9692

junixsocket-common/src/test/java/org/newsclub/net/unix/AvailableTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@
2929

3030
import org.junit.jupiter.api.Test;
3131

32-
import com.kohlschutter.annotations.compiletime.SuppressFBWarnings;
33-
34-
@SuppressFBWarnings({
35-
"THROWS_METHOD_THROWS_CLAUSE_THROWABLE", "THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION"})
3632
public abstract class AvailableTest<A extends SocketAddress> extends SocketTestBase<A> {
3733
private static final int BYTES_SENT = 23;
3834
private static final int TIME_TO_SLEEP = 100;

junixsocket-common/src/test/java/org/newsclub/net/unix/BufferOverflowTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@
4343
/**
4444
* See <a href="https://code.google.com/archive/p/junixsocket/issues/20">Issue 20</a>.
4545
*/
46-
@SuppressFBWarnings({
47-
"THROWS_METHOD_THROWS_CLAUSE_THROWABLE", "THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION",
48-
"RANGE_ARRAY_LENGTH"})
46+
@SuppressFBWarnings({"RANGE_ARRAY_LENGTH"})
4947
// CPD-OFF - Skip code-duplication checks
5048
public abstract class BufferOverflowTest<A extends SocketAddress> extends SocketTestBase<A> {
5149
private ServerSocket server;

junixsocket-common/src/test/java/org/newsclub/net/unix/CancelAcceptTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
import org.junit.jupiter.api.Test;
3333

34-
import com.kohlschutter.annotations.compiletime.SuppressFBWarnings;
3534
import com.kohlschutter.testutil.TestAbortedWithImportantMessageException;
3635
import com.kohlschutter.testutil.TestAbortedWithImportantMessageException.MessageType;
3736
import com.kohlschutter.testutil.TestStackTraceUtil;
@@ -41,8 +40,6 @@
4140
*
4241
* @see <a href="https://code.google.com/archive/p/junixsocket/issues/6">Issue 6</a>
4342
*/
44-
@SuppressFBWarnings({
45-
"THROWS_METHOD_THROWS_CLAUSE_THROWABLE", "THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION"})
4643
public abstract class CancelAcceptTest<A extends SocketAddress> extends SocketTestBase<A> {
4744
protected static final String NO_SOCKETEXCEPTION_CLOSED_SERVER =
4845
"Did not throw SocketException when connecting to closed server socket";

junixsocket-common/src/test/java/org/newsclub/net/unix/DatagramSocketTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,10 @@
4141
import org.junit.jupiter.api.Test;
4242
import org.opentest4j.AssertionFailedError;
4343

44-
import com.kohlschutter.annotations.compiletime.SuppressFBWarnings;
4544
import com.kohlschutter.testutil.TestAbortedWithImportantMessageException;
4645
import com.kohlschutter.testutil.TestAbortedWithImportantMessageException.MessageType;
4746

4847
@AFSocketCapabilityRequirement(AFSocketCapability.CAPABILITY_UNIX_DATAGRAMS)
49-
@SuppressFBWarnings({
50-
"THROWS_METHOD_THROWS_CLAUSE_THROWABLE", "THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION"})
5148
public abstract class DatagramSocketTest<A extends SocketAddress> extends SocketTestBase<A> {
5249
protected DatagramSocketTest(AddressSpecifics<A> asp) {
5350
super(asp);

junixsocket-common/src/test/java/org/newsclub/net/unix/EndOfFileTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,11 @@
3939
import org.junit.jupiter.api.BeforeEach;
4040
import org.junit.jupiter.api.Test;
4141

42-
import com.kohlschutter.annotations.compiletime.SuppressFBWarnings;
43-
4442
/**
4543
* See <a href="https://code.google.com/archive/p/junixsocket/issues/9">Issue 9</a>.
4644
*
4745
* @author Derrick Rice (April, 2010)
4846
*/
49-
@SuppressFBWarnings({
50-
"THROWS_METHOD_THROWS_CLAUSE_THROWABLE", "THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION"})
5147
public abstract class EndOfFileTest<A extends SocketAddress> extends SocketTestBase<A> {
5248
protected ServerSocket server;
5349
protected ExecutorService executor;

junixsocket-common/src/test/java/org/newsclub/net/unix/FileDescriptorCastTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,10 @@
4949
import org.eclipse.jdt.annotation.Nullable;
5050
import org.junit.jupiter.api.Test;
5151

52-
import com.kohlschutter.annotations.compiletime.SuppressFBWarnings;
5352
import com.kohlschutter.testutil.TestAbortedNotAnIssueException;
5453
import com.kohlschutter.util.IOUtil;
5554

5655
@SuppressWarnings("PMD.CouplingBetweenObjects")
57-
@SuppressFBWarnings({
58-
"THROWS_METHOD_THROWS_CLAUSE_THROWABLE", "THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION"})
5956
public class FileDescriptorCastTest {
6057
// CPD-OFF
6158

junixsocket-common/src/test/java/org/newsclub/net/unix/FinalizeTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535

3636
import org.junit.jupiter.api.Test;
3737

38-
import com.kohlschutter.annotations.compiletime.SuppressFBWarnings;
3938
import com.kohlschutter.testutil.CommandAvailabilityRequirement;
4039
import com.kohlschutter.testutil.ForkedVM;
4140
import com.kohlschutter.testutil.ForkedVMRequirement;
@@ -51,8 +50,6 @@
5150
* @author Christian Kohlschütter
5251
*/
5352
@CommandAvailabilityRequirement(commands = {"lsof"})
54-
@SuppressFBWarnings({
55-
"THROWS_METHOD_THROWS_CLAUSE_THROWABLE", "THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION"})
5653
public abstract class FinalizeTest<A extends SocketAddress> extends SocketTestBase<A> {
5754
private Process process = null;
5855

junixsocket-common/src/test/java/org/newsclub/net/unix/FinalizeTestClient.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,9 @@
3333
* @see FinalizeTest
3434
* @author Christian Kohlschütter
3535
*/
36-
@SuppressFBWarnings({
37-
"THROWS_METHOD_THROWS_CLAUSE_THROWABLE", "THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION"})
3836
public class FinalizeTestClient {
3937
@SuppressWarnings({"ModifiedButNotUsed" /* errorprone */})
40-
@SuppressFBWarnings({"RV_RETURN_VALUE_IGNORED", "UC_USELESS_OBJECT"})
38+
@SuppressFBWarnings({"UC_USELESS_OBJECT"})
4139
public static void main(String[] args) throws Exception {
4240
String socketType = System.getProperty("test.junixsocket.socket.type", "");
4341
String socketName = System.getProperty("test.junixsocket.socket", "");
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* junixsocket
3+
*
4+
* Copyright 2009-2024 Christian Kohlschütter
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
package org.newsclub.net.unix;
19+
20+
import java.net.SocketAddress;
21+
22+
public class MulticastThroughputTest<A extends SocketAddress> extends SocketTestBase<A> {
23+
protected MulticastThroughputTest(AddressSpecifics<A> asp) {
24+
super(asp);
25+
}
26+
}

0 commit comments

Comments
 (0)