He-Pin commented on code in PR #782:
URL: https://github.com/apache/pekko-grpc/pull/782#discussion_r3527673812
##########
codegen/src/main/scala/org/apache/pekko/grpc/gen/Main.scala:
##########
@@ -83,7 +84,12 @@ object Main {
else throw new IllegalArgumentException("At least one of
generateClient or generateServer must be enabled")
}
val loadedExtraGenerators =
- extraGenerators.map(cls =>
Class.forName(cls).getDeclaredConstructor().newInstance().asInstanceOf[CodeGenerator])
+ extraGenerators.map { cls =>
+ val clazz = Class.forName(cls)
+ val ctor = clazz.getDeclaredConstructor()
+ ctor.setAccessible(true)
Review Comment:
this is not right , stay turn
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]