Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the robustness of the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses an issue where a null server address could cause problems by adding exception handling around server address and port parsing. The changes are logical and include a new test case to cover the fix. My feedback focuses on refining the exception handling to be more specific, which improves the robustness of the code by not suppressing critical system errors.
gax-java/gax/src/main/java/com/google/api/gax/rpc/EndpointContext.java
Outdated
Show resolved
Hide resolved
|
|
|
Closing in favor of googleapis/google-cloud-java#12184 |





In case of an invalid endpoint such as
localhost:-1, the current parsing logic returns null for server address. This PR made server address nullable. And added a null check for the port parsing.In addition, added a try catch for the whole parsing logic because serviceAddress and serverPort should only be used for obersevability and should not affect regular requests.