Skip to content
This repository was archived by the owner on Jul 18, 2024. It is now read-only.

Commit 5ace597

Browse files
committed
Serial warnings cleanup
1 parent 51d030f commit 5ace597

9 files changed

+3
-46
lines changed

.settings/org.eclipse.jdt.ui.prefs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
cleanup.add_default_serial_version_id=false
2-
cleanup.add_generated_serial_version_id=true
2+
cleanup.add_generated_serial_version_id=false
33
cleanup.add_missing_annotations=true
44
cleanup.add_missing_deprecated_annotations=true
55
cleanup.add_missing_methods=false
66
cleanup.add_missing_nls_tags=false
77
cleanup.add_missing_override_annotations=true
88
cleanup.add_missing_override_annotations_interface_methods=true
9-
cleanup.add_serial_version_id=true
9+
cleanup.add_serial_version_id=false
1010
cleanup.always_use_blocks=true
1111
cleanup.always_use_parentheses_in_expressions=false
1212
cleanup.always_use_this_for_non_static_field_access=true

src/main/java/com/ibm/asyncutil/locks/AbstractSimpleEpoch.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
abstract class AbstractSimpleEpoch
1717
// opportunistically extend AtomicInteger for state
1818
extends AtomicInteger implements ObservableEpoch.EpochToken {
19-
/**
20-
*
21-
*/
22-
private static final long serialVersionUID = -6988892107222944382L;
19+
2320
/*
2421
* Epoch state is maintained by an atomically adjusted integer. Termination sets the high bit of
2522
* the state; any participants attempting to enter will fail if they find the high bit is set.

src/main/java/com/ibm/asyncutil/locks/FairAsyncNamedReadWriteLock.java

-4
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ public class FairAsyncNamedReadWriteLock<T> implements AsyncNamedReadWriteLock<T
3737
@SuppressWarnings("serial")
3838
private final class NamedNode
3939
extends FairAsyncReadWriteLock.Node {
40-
/**
41-
*
42-
*/
43-
private static final long serialVersionUID = -4539914522341330733L;
4440
private final T name;
4541

4642
/**

src/main/java/com/ibm/asyncutil/locks/FairAsyncReadWriteLock.java

-4
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ public FairAsyncReadWriteLock() {
5656
@SuppressWarnings("serial")
5757
static class Node extends AbstractSimpleEpoch
5858
implements ReadLockToken, WriteLockToken, AsyncStampedLock.Stamp {
59-
/**
60-
*
61-
*/
62-
private static final long serialVersionUID = 2082395072514665800L;
6359
final CompletableFuture<ReadLockToken> readFuture;
6460
final CompletableFuture<WriteLockToken> writeFuture;
6561
Node next;

src/main/java/com/ibm/asyncutil/locks/ObservableEpochImpl.java

-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
*/
1919
@SuppressWarnings("serial")
2020
class ObservableEpochImpl extends AbstractSimpleEpoch implements ObservableEpoch {
21-
/**
22-
*
23-
*/
24-
private static final long serialVersionUID = -3263030267313569994L;
2521
private final CompletableFuture<Boolean> future = new CompletableFuture<>();
2622

2723
@Override

src/test/java/com/ibm/asyncutil/iteration/AsyncIteratorTest.java

-4
Original file line numberDiff line numberDiff line change
@@ -549,10 +549,6 @@ public void testBatch() {
549549

550550
@SuppressWarnings("serial")
551551
class LimitedList<T> extends ArrayList<T> {
552-
/**
553-
*
554-
*/
555-
private static final long serialVersionUID = 6604914508983772665L;
556552
// this poll will fail if the iterator tries to create more batches than necessary.
557553
// (not sufficiently lazy)
558554
final int limit = sizeLimitsQueue.poll();

src/test/java/com/ibm/asyncutil/locks/AbstractAsyncLockTest.java

-5
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,6 @@ public final void testStackOverflow() throws Exception {
152152

153153
@SuppressWarnings("serial")
154154
private static class LockStateException extends RuntimeException {
155-
156-
/**
157-
*
158-
*/
159-
private static final long serialVersionUID = -1646858483730793331L;
160155
}
161156

162157
@Test(expected = LockStateException.class)

src/test/java/com/ibm/asyncutil/locks/AbstractAsyncReadWriteLockTest.java

-5
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,6 @@ public final void testDowngradeStackOverflow() throws TimeoutException {
145145

146146
@SuppressWarnings("serial")
147147
private static class LockStateException extends RuntimeException {
148-
149-
/**
150-
*
151-
*/
152-
private static final long serialVersionUID = -9098909095535022560L;
153148
}
154149

155150
@Test(expected = LockStateException.class)

src/test/java/com/ibm/asyncutil/util/TryWithTest.java

-14
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,13 @@
1919
public class TryWithTest {
2020
@SuppressWarnings("serial")
2121
private static class CloseException extends Exception {
22-
23-
/**
24-
*
25-
*/
26-
private static final long serialVersionUID = -2012800811952647868L;
2722
}
2823
@SuppressWarnings("serial")
2924
private static class CloseRuntimeException extends RuntimeException {
3025

31-
/**
32-
*
33-
*/
34-
private static final long serialVersionUID = 6809440040185897343L;
3526
}
3627
@SuppressWarnings("serial")
3728
private static class ActionException extends RuntimeException {
38-
39-
/**
40-
*
41-
*/
42-
private static final long serialVersionUID = 6731901340457855165L;
4329
}
4430

4531
interface CheckableAutoCloseable extends AutoCloseable {

0 commit comments

Comments
 (0)