-
Notifications
You must be signed in to change notification settings - Fork 40
added some minor fixes in VersionController.java file #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughThe changes refine the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant VersionController
participant GitPropertiesLoader
Client->>VersionController: GET /version
VersionController->>GitPropertiesLoader: readGitProperties()
alt Git properties available
GitPropertiesLoader-->>VersionController: properties data
VersionController-->>Client: JSON version info
else Git properties missing
GitPropertiesLoader-->>VersionController: null inputStream
VersionController-->>Client: Error (FileNotFoundException)
end
Poem
Tip β‘π¬ Agentic Chat (Pro Plan, General Availability)
π Recent review detailsConfiguration used: CodeRabbit UI π Files selected for processing (1)
π§ Files skipped from review as they are similar to previous changes (1)
πͺ§ TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
π§Ή Nitpick comments (1)
src/main/java/com/iemr/common/identity/controller/version/VersionController.java (1)
42-42
: Good improvement making the logger static final!Changing the logger to
static final
follows best practices for SLF4J. This reduces memory usage as it creates only one logger instance shared across all instances of this class rather than creating a new logger for each controller instance.Consider applying this same pattern consistently across other controllers in the codebase like
FamilyTaggingController
which currently uses non-static loggers.
π Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
π Files selected for processing (1)
src/main/java/com/iemr/common/identity/controller/version/VersionController.java
(2 hunks)
π§° Additional context used
𧬠Code Graph Analysis (1)
src/main/java/com/iemr/common/identity/controller/version/VersionController.java (1)
src/main/java/com/iemr/common/identity/controller/familyTagging/FamilyTaggingController.java (1)
CrossOrigin
(38-142)
π Additional comments (1)
src/main/java/com/iemr/common/identity/controller/version/VersionController.java (1)
46-46
: Appropriate removal of theconsumes
attributeRemoving the
consumes = "application/json"
attribute from the@GetMapping
annotation is appropriate since GET requests typically don't have a request body to consume. The endpoint now correctly specifies only that it produces JSON responses.
src/main/java/com/iemr/common/identity/controller/version/VersionController.java
Show resolved
Hide resolved
|
Hi @Rishav123raj what is this PR about? |
Hi @drtechie I have made a minor change in VersionController.java file to check if the inputstream is null then a FileNotFoundException will occur. Also made the logger variable both static and final and updated to call the VersionController.class. |
π Description
JIRA ID:
Please provide a summary of the change and the motivation behind it. Include relevant context and details.
β Type of Change
βΉοΈ Additional Information
Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.
Summary by CodeRabbit
Refactor
Bug Fixes