Alonexc opened a new issue, #3515: URL: https://github.com/apache/incubator-eventmesh/issues/3515
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no similar issues. ### Enhancement Request located at: eventmesh-security-plugin/eventmesh-security-auth-token/src/main/java/org/apache/eventmesh/auth/token/impl/auth/AuthTokenUtils.java analysis and explanation: a. The logic of "authTokenByPublicKey" and "helloTaskAuthTokenByPublicKey" method in lines "54-87" and "99-132" is the same, so it can be extracted as one method. b. Variable 'validationKeyBytes' initializer 'new byte[0]' is redundant.[line 66,111] c. Argument 'publicKeyUrl' might be null.[line 68,113]  d. 'if' statement can be simplified.[line 146]  e. The "{}" is redundant.[line 90,134]  ### Describe the solution you'd like a. Repeat the logic code extracted as a method. b. Remove redundant initializers. c. Use 'Objects.requireNonNull()' to avoid an NPE.  d. Replace this if-then-else statement by a single return statement  e. Remove the extra "{}".  ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! -- 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]
