diff options
author | Carlos Chinchilla <cachinchilla@google.com> | 2023-11-02 21:21:42 +0000 |
---|---|---|
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-11-02 21:21:42 +0000 |
commit | e1835d3d9149ec69350bb8e68cdadb53db066b7a (patch) | |
tree | f2638284923a958264d91168af17e79c9f53fdce | |
parent | 20b5cd27bfe54bc3138a03d3e003956537b1368b (diff) | |
download | pigweed-e1835d3d9149ec69350bb8e68cdadb53db066b7a.tar.gz |
pw_rpc: Update Java service error with tip
Add a tip on how to possibly fix some linkage errors while the fix is
not yet done.
Bug: 293361955
Change-Id: If0ed85987638f6f0667f60f64cc57a5949c21d8e
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/178812
Reviewed-by: Alexei Frolov <frolv@google.com>
Commit-Queue: Carlos Chinchilla <cachinchilla@google.com>
-rw-r--r-- | pw_rpc/java/main/dev/pigweed/pw_rpc/Service.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pw_rpc/java/main/dev/pigweed/pw_rpc/Service.java b/pw_rpc/java/main/dev/pigweed/pw_rpc/Service.java index ec6f7eb6f..a239f10ef 100644 --- a/pw_rpc/java/main/dev/pigweed/pw_rpc/Service.java +++ b/pw_rpc/java/main/dev/pigweed/pw_rpc/Service.java @@ -190,9 +190,11 @@ public class Service { return (Parser<? extends MessageLite>) messageType.getMethod("parser").invoke(null); } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { throw new LinkageError( - String.format("Service method was created with %s, which does not have parser() method; " - + "either the class is not a generated protobuf class " - + "or the parser() method was optimized out (see b/293361955)", + String.format( + "Service method created with %s is missing parser() method, likely optimized out. " + + "Pass MyMessage.parser() instead of MyMessage.class in service declarations. " + + "The class-based API is deprecated and will be removed. " + + "See b/293361955.", messageType), e); } |