You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "He-Pin (via GitHub)" <gi...@apache.org> on 2026/06/18 21:34:54 UTC

[PR] refactor: modernize Java example code with Java 17 records [pekko-grpc]

He-Pin opened a new pull request, #734:
URL: https://github.com/apache/pekko-grpc/pull/734

   ### Motivation
   Java 17 introduced records that make Java code more concise by eliminating boilerplate for data carrier classes.
   
   ### Modification
   - Convert ChangeGreeting, GetGreeting, Greeting to records in typedhelloworld GreeterActor
   - Convert ChangeGreeting, Greeting to records in statefulhelloworld GreeterActor
   - Update field accesses to use record accessor methods
   
   ### Result
   Example Java code is more concise and idiomatic for Java 17+.
   
   ### Tests
   - `sbt "plugin-tester-java / compile"` (to be verified by CI)
   
   ### References
   None - code modernization


-- 
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: notifications-unsubscribe@pekko.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] refactor: modernize Java example code with Java 17 records [pekko-grpc]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on PR #734:
URL: https://github.com/apache/pekko-grpc/pull/734#issuecomment-4748657790

   fixed now.


-- 
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: notifications-unsubscribe@pekko.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] refactor: modernize Java example code with Java 17 records [pekko-grpc]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #734:
URL: https://github.com/apache/pekko-grpc/pull/734#issuecomment-4746417647

   ```
   [error] /home/runner/work/pekko-grpc/pekko-grpc/plugin-tester-java/src/main/java/example/myapp/statefulhelloworld/GreeterServiceImpl.java:41:66: greeting has private access in example.myapp.statefulhelloworld.GreeterActor.Greeting
   [error] ((GreeterActor.Greeting) message).greeting
   [error]                                           ^
   [info] done compiling
   [info] compiling 6 Scala sources to /home/runner/work/pekko-grpc/pekko-grpc/benchmarks/target/scala-2.13/classes ...
   [error] /home/runner/work/pekko-grpc/pekko-grpc/plugin-tester-java/src/main/java/example/myapp/typedhelloworld/GreeterServiceImpl.java:45:81: greeting has private access in example.myapp.typedhelloworld.GreeterActor.Greeting
   [error] ((GreeterActor.Greeting) message).greeting
   [error]                                           ^
   [info] done compiling
   ```
   
   Possibly needs to be `.greeting()` instead of `.greeting`


-- 
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: notifications-unsubscribe@pekko.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] refactor: modernize Java example code with Java 17 records [pekko-grpc]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin merged PR #734:
URL: https://github.com/apache/pekko-grpc/pull/734


-- 
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: notifications-unsubscribe@pekko.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] refactor: modernize Java example code with Java 17 records [pekko-grpc]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on PR #734:
URL: https://github.com/apache/pekko-grpc/pull/734#issuecomment-4746528540

   will fix


-- 
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: notifications-unsubscribe@pekko.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org