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

Fix: All toPb() methods access level changed to public #1196

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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 @@ -636,7 +636,7 @@ public Map<String, Value<?>> getProperties() {
return properties;
}

final com.google.datastore.v1.Entity toPb() {
public final com.google.datastore.v1.Entity toPb() {
com.google.datastore.v1.Entity.Builder entityPb = com.google.datastore.v1.Entity.newBuilder();
for (Map.Entry<String, Value<?>> entry : properties.entrySet()) {
entityPb.putProperties(entry.getKey(), entry.getValue().toPb());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public boolean equals(Object obj) {
&& Objects.equals(getPath(), other.getPath());
}

com.google.datastore.v1.Key toPb() {
public com.google.datastore.v1.Key toPb() {
com.google.datastore.v1.Key.Builder keyPb = com.google.datastore.v1.Key.newBuilder();
com.google.datastore.v1.PartitionId.Builder partitionIdPb =
com.google.datastore.v1.PartitionId.newBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public static Blob copyFrom(InputStream input) throws IOException {
return copyFrom(bytes.toByteArray());
}

com.google.datastore.v1.Value toPb() {
public com.google.datastore.v1.Value toPb() {
return com.google.datastore.v1.Value.newBuilder().setBlobValue(byteString).build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static Cursor copyFrom(byte[] bytes) {
return new Cursor(ByteString.copyFrom(checkNotNull(bytes)));
}

com.google.datastore.v1.Value toPb() {
public com.google.datastore.v1.Value toPb() {
return com.google.datastore.v1.Value.newBuilder().setBlobValue(byteString).build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public boolean equals(Object obj) {
return Objects.equals(cursor, other.cursor) && Objects.equals(value, other.value);
}

com.google.datastore.v1.GqlQueryParameter toPb() {
public com.google.datastore.v1.GqlQueryParameter toPb() {
com.google.datastore.v1.GqlQueryParameter.Builder argPb =
com.google.datastore.v1.GqlQueryParameter.newBuilder();
if (cursor != null) {
Expand Down Expand Up @@ -513,7 +513,7 @@ public boolean equals(Object obj) {
&& Objects.equals(positionalBindings, other.positionalBindings);
}

com.google.datastore.v1.GqlQuery toPb() {
public com.google.datastore.v1.GqlQuery toPb() {
GqlQueryProtoPreparer protoPreparer = new GqlQueryProtoPreparer();
return protoPreparer.prepare(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static LatLng of(double latitude, double longitude) {
return new LatLng(latitude, longitude);
}

protected com.google.type.LatLng toPb() {
public com.google.type.LatLng toPb() {
return com.google.type.LatLng.newBuilder()
.setLatitude(latitude)
.setLongitude(longitude)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public boolean equals(Object obj) {
&& Objects.equals(name, other.name);
}

com.google.datastore.v1.Key.PathElement toPb() {
public com.google.datastore.v1.Key.PathElement toPb() {
com.google.datastore.v1.Key.PathElement.Builder pathElementPb =
com.google.datastore.v1.Key.PathElement.newBuilder();
pathElementPb.setKind(kind);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public Operator apply(String constant) {

static final Operator OR = type.createAndRegister("OR");

com.google.datastore.v1.CompositeFilter.Operator toPb() {
public com.google.datastore.v1.CompositeFilter.Operator toPb() {
return com.google.datastore.v1.CompositeFilter.Operator.valueOf(name());
}

Expand Down Expand Up @@ -238,7 +238,7 @@ public static CompositeFilter or(Filter first, Filter... other) {
}

@Override
com.google.datastore.v1.Filter toPb() {
public com.google.datastore.v1.Filter toPb() {
com.google.datastore.v1.Filter.Builder filterPb = com.google.datastore.v1.Filter.newBuilder();
com.google.datastore.v1.CompositeFilter.Builder compositeFilterPb =
filterPb.getCompositeFilterBuilder();
Expand Down Expand Up @@ -287,7 +287,7 @@ public Operator apply(String constant) {
static final Operator HAS_ANCESTOR = type.createAndRegister("HAS_ANCESTOR");
static final Operator NOT_IN = type.createAndRegister("NOT_IN");

com.google.datastore.v1.PropertyFilter.Operator toPb() {
public com.google.datastore.v1.PropertyFilter.Operator toPb() {
return com.google.datastore.v1.PropertyFilter.Operator.valueOf(name());
}

Expand Down Expand Up @@ -564,7 +564,7 @@ public static PropertyFilter isNull(String property) {
}

@Override
com.google.datastore.v1.Filter toPb() {
public com.google.datastore.v1.Filter toPb() {
com.google.datastore.v1.Filter.Builder filterPb = com.google.datastore.v1.Filter.newBuilder();
com.google.datastore.v1.PropertyFilter.Builder propertyFilterPb =
filterPb.getPropertyFilterBuilder();
Expand Down Expand Up @@ -605,7 +605,7 @@ public Direction apply(String constant) {
public static final Direction ASCENDING = type.createAndRegister("ASCENDING");
public static final Direction DESCENDING = type.createAndRegister("DESCENDING");

com.google.datastore.v1.PropertyOrder.Direction toPb() {
public com.google.datastore.v1.PropertyOrder.Direction toPb() {
return com.google.datastore.v1.PropertyOrder.Direction.valueOf(name());
}

Expand Down Expand Up @@ -664,7 +664,7 @@ public Direction getDirection() {
return direction;
}

com.google.datastore.v1.PropertyOrder toPb() {
public com.google.datastore.v1.PropertyOrder toPb() {
return com.google.datastore.v1.PropertyOrder.newBuilder()
.setDirection(direction.toPb())
.setProperty(
Expand Down Expand Up @@ -1053,7 +1053,7 @@ public StructuredQuery<V> nextQuery(com.google.datastore.v1.RunQueryResponse res
return builder.build();
}

com.google.datastore.v1.Query toPb() {
public com.google.datastore.v1.Query toPb() {
StructuredQueryProtoPreparer protoPreparer = new StructuredQueryProtoPreparer();
return protoPreparer.prepare(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public boolean equals(Object obj) {
}

@SuppressWarnings("unchecked")
com.google.datastore.v1.Value toPb() {
public com.google.datastore.v1.Value toPb() {
return getType().getMarshaller().toProto(this);
}

Expand Down