Make commitID byte[] final
This commit is contained in:
parent
64956d2d87
commit
6dbe7d4b55
|
@ -1147,7 +1147,9 @@ public abstract class Engine implements Closeable {
|
||||||
public abstract boolean hasUncommittedChanges();
|
public abstract boolean hasUncommittedChanges();
|
||||||
|
|
||||||
public static class CommitId implements Writeable {
|
public static class CommitId implements Writeable {
|
||||||
private byte[] id;
|
|
||||||
|
private final byte[] id;
|
||||||
|
|
||||||
public CommitId(byte[] id) {
|
public CommitId(byte[] id) {
|
||||||
assert id != null;
|
assert id != null;
|
||||||
this.id = Arrays.copyOf(id, id.length);
|
this.id = Arrays.copyOf(id, id.length);
|
||||||
|
@ -1165,8 +1167,7 @@ public abstract class Engine implements Closeable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CommitId readFrom(StreamInput in) throws IOException {
|
public CommitId readFrom(StreamInput in) throws IOException {
|
||||||
byte[] bytes = in.readByteArray();
|
return new CommitId(in);
|
||||||
return new CommitId(bytes);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue