You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like the functionality that using things like Int32Value, Int64Value, StringValue, BoolValue, etc would allow for using setters of the form setFoo(Integer), setFoo(Long), setFoo(String), setFoo(Boolean) where a passed null will essentially no-op, but a value would call the XYZValue.newBuilder.setValue(arg), but that on the getter side of things the interactions still have hasFoo() and getFoo().getValue() to access the data. Given that the return type can't be type parameterized easily in Java, this seems like a good place to start, possibly with discussion as to whether there should be getters of the form getNullableFoo() or getOptionalFoo that gets generated.
If this is something that would be helpful to others(I think it would) I'd be happy to contribute a pull request that at least makes these changes to the setter side of things with further discussion for proper use on the getter side.
The text was updated successfully, but these errors were encountered:
@xfxyjwf I'm interested in contributing this if it's desirable. Should I just open a pull request? I didn't want to do the work if it would be a rejection no matter what for some reason.
The proposal sounds good to me, but API changes like this require a Java API review. It's Google internal and we don't currently have a way for external contributors to participate. If you are interested in helping make this change, can you create a Google doc describing the proposal? I can take it to the review committee on your behalf.
There isn't any publicly available template as far as I know. I think you can just write it in your preferred format and I'll comment if it's missing anything needed for the API review.
I would like the functionality that using things like Int32Value, Int64Value, StringValue, BoolValue, etc would allow for using setters of the form setFoo(Integer), setFoo(Long), setFoo(String), setFoo(Boolean) where a passed null will essentially no-op, but a value would call the XYZValue.newBuilder.setValue(arg), but that on the getter side of things the interactions still have hasFoo() and getFoo().getValue() to access the data. Given that the return type can't be type parameterized easily in Java, this seems like a good place to start, possibly with discussion as to whether there should be getters of the form getNullableFoo() or getOptionalFoo that gets generated.
If this is something that would be helpful to others(I think it would) I'd be happy to contribute a pull request that at least makes these changes to the setter side of things with further discussion for proper use on the getter side.
The text was updated successfully, but these errors were encountered: