Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add serialVersionUID to ByteString and subclasses #10718

Merged
merged 2 commits into from
Oct 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
*/
@CheckReturnValue
public abstract class ByteString implements Iterable<Byte>, Serializable {
private static final long serialVersionUID = 1L;

/**
* When two strings to be concatenated have a combined length shorter than this, we just copy
Expand Down Expand Up @@ -945,6 +946,8 @@ public final String toStringUtf8() {

/** Base class for leaf {@link ByteString}s (i.e. non-ropes). */
abstract static class LeafByteString extends ByteString {
private static final long serialVersionUID = 1L;

@Override
protected final int getTreeDepth() {
return 0;
Expand Down Expand Up @@ -1603,7 +1606,6 @@ protected int getOffsetIntoBytes() {
// Keep this class private to avoid deadlocks in classloading across threads as ByteString's
// static initializer loads LiteralByteString and another thread loads BoundedByteString.
private static final class BoundedByteString extends LiteralByteString {

private final int bytesOffset;
private final int bytesLength;

Expand Down