You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/07/11 15:03:11 UTC

[GitHub] [beam] nbali commented on a diff in pull request #17775: [BEAM-14525] / #21626 Fix for Protobuf getter/setter method name discovery issue

nbali commented on code in PR #17775:
URL: https://github.com/apache/beam/pull/17775#discussion_r918043106


##########
sdks/java/extensions/protobuf/src/main/java/org/apache/beam/sdk/extensions/protobuf/ProtoByteBuddyUtils.java:
##########
@@ -190,15 +191,59 @@ class ProtoByteBuddyUtils {
   private static final String DEFAULT_PROTO_GETTER_PREFIX = "get";
   private static final String DEFAULT_PROTO_SETTER_PREFIX = "set";
 
+  // BEAM-14525: there is a slight difference between 'protoc' and Guava CaseFormat regarding the
+  // camel case conversion
+  // - guava keeps the first character after a number lower case
+  // - protoc makes it upper case
+  // based on
+  // https://github.com/protocolbuffers/protobuf/blob/ec79d0d328c7e6cea15cc27fbeb9b018ca289590/src/google/protobuf/compiler/java/helpers.cc#L173-L208
+  @VisibleForTesting
+  static String convertProtoPropertyNameToJavaPropertyName(String input) {

Review Comment:
   @aaltay @kileys I'm kinda lost now. If this is going to be a discussion, then turns taking weeks is going make it quite a long one for a bugfix.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org