8000 Change BaseWriteChannel.position type to long to fix overflow by mziccard · Pull Request #1390 · googleapis/google-cloud-java · GitHub
[go: up one dir, main page]

Skip to content
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 @@ -41,7 +41,7 @@ public abstract class BaseWriteChannel<
private final ServiceOptionsT options;
private final EntityT entity;
private final String uploadId;
private int position;
private long position;
private byte[] buffer = new byte[0];
private int limit;
private boolean isOpen = true;
Expand Down Expand Up @@ -101,11 +101,11 @@ protected String getUploadId() {
}

@Deprecated
protected int position() {
protected long position() {
return getPosition();
}

protected int getPosition() {
protected long getPosition() {
return position;
}

Expand All @@ -119,7 +119,7 @@ protected byte[] getBuffer() {
}

@Deprecated
protected int limit() {
protected long limit() {
return getLimit();
}

Expand Down Expand Up @@ -245,7 +245,7 @@ protected abstract static class BaseState<
protected final ServiceOptionsT serviceOptions;
protected final EntityT entity;
protected final String uploadId;
protected final int position;
protected final long position;
protected final byte[] buffer;
protected final boolean isOpen;
protected final int chunkSize;
Expand Down Expand Up @@ -274,7 +274,7 @@ public abstract static class Builder<
private final ServiceOptionsT serviceOptions;
private final EntityT entity;
private final String uploadId;
private int position;
private long position;
private byte[] buffer;
private boolean isOpen;
private int chunkSize;
Expand All @@ -290,7 +290,7 @@ public Builder<ServiceOptionsT, EntityT> position(int position) {
return setPosition(position);
}

public Builder<ServiceOptionsT, EntityT> setPosition(int position) {
public Builder<ServiceOptionsT, EntityT> setPosition(long position) {
this.position = position;
return this;
}
Expand Down
0