Sanitize ServletContextPath on JSON read#2498
Conversation
Summary of ChangesHello @PeterSuna, 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 addresses a potential issue where 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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly moves the sanitization logic for restconfServletContextPath from the getter into the configuration reading utility classes. This resolves an issue where equals() and hashCode() could behave incorrectly. The changes are applied consistently across both restconf-nb-community and restconf-netty-nb-community modules. I've found a potential null pointer exception in the new sanitization logic and some code duplication that could be addressed to improve maintainability. Overall, a good improvement.
...main/java/io/lighty/modules/northbound/restconf/community/impl/util/RestConfConfigUtils.java
Outdated
Show resolved
Hide resolved
...java/io/lighty/modules/northbound/netty/restconf/community/impl/util/NettyRestConfUtils.java
Outdated
Show resolved
Hide resolved
...main/java/io/lighty/modules/northbound/restconf/community/impl/util/RestConfConfigUtils.java
Show resolved
Hide resolved
0dd2003 to
3dd4df8
Compare
Updating the restconf path in the getter method may cause incorrect behavior in the equals() and hashCode() methods. Move this logic into the ConfigUtils classes to fix this while reading the JSON configuration with Jackson. JIRA: LIGHTY-333 Signed-off-by: Peter Suna <[email protected]>
3dd4df8 to
d9b0b15
Compare
Updating the restconf path in the getter method may cause incorrect behavior in the equals() and hashCode() methods.
Move this logic into the ConfigUtils classes to fix this while reading the JSON configuration with Jackson.
JIRA: LIGHTY-333