-
Notifications
You must be signed in to change notification settings - Fork 30
Constants added and null check #77
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -10,6 +10,8 @@ | |||||
| import org.springframework.web.context.request.RequestContextHolder; | ||||||
| import org.springframework.web.context.request.ServletRequestAttributes; | ||||||
|
|
||||||
| import com.iemr.ecd.utils.constants.Constants; | ||||||
|
|
||||||
| import jakarta.servlet.http.HttpServletRequest; | ||||||
|
|
||||||
| public class RestTemplateUtil { | ||||||
|
|
@@ -39,7 +41,9 @@ public static HttpEntity<Object> createRequestEntity(Object body, String authori | |||||
| headers.add(HttpHeaders.USER_AGENT, UserAgentContext.getUserAgent()); | ||||||
| } | ||||||
| headers.add(HttpHeaders.AUTHORIZATION, authorization); | ||||||
| headers.add("JwtToken",requestHeader.getHeader("JwtToken")); | ||||||
| if(null != requestHeader.getHeader(Constants.JWT_TOKEN)) { | ||||||
| headers.add(Constants.JWT_TOKEN,requestHeader.getHeader(Constants.JWT_TOKEN)); | ||||||
| } | ||||||
| if(null != jwtTokenFromCookie) { | ||||||
| headers.add(HttpHeaders.COOKIE, "Jwttoken=" + jwtTokenFromCookie); | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π οΈ Refactor suggestion Fix inconsistent string literal usage. Line 48 still uses a hardcoded string Apply this diff to maintain consistency: - headers.add(HttpHeaders.COOKIE, "Jwttoken=" + jwtTokenFromCookie);
+ headers.add(HttpHeaders.COOKIE, Constants.JWT_TOKEN + "=" + jwtTokenFromCookie);π Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||
| } | ||||||
|
|
||||||
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.
π‘ Verification agent
π§© Analysis chain
Verify the business logic change for record filtering
The query modification adds filtering for
isFurtherCallRequiredfield, excluding records where this flag is explicitly set tofalse. While the syntax is correct, please ensure:getRecordCountmethod are aware of this behavioral changeRun the following script to verify consistent filtering across related repositories:
π Script executed:
Length of output: 24457
Review update: Filter consistency verified
The added filter for
isFurtherCallRequiredinMotherRecordRepo#getRecordCountmatches the same condition used throughoutOutboundCallsRepo, so the technical change is correct.Please address the following:
isFurtherCallRequired = falseare now excluded) in your API/repo documentation.getRecordCount.Affected location:
π€ Prompt for AI Agents