Skip to content

Commit

Permalink
[PAGOPA-2178] fix(log): resolve the string format error
Browse files Browse the repository at this point in the history
  • Loading branch information
jacopocarlini committed Sep 27, 2024
1 parent ffd4fde commit b6b108f
Showing 1 changed file with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public class PaymentsController implements IPaymentsController {

private static final String LOG_BASE_HEADER_INFO =
"[RequestMethod: %s] - [ClassMethod: %s] - [MethodParamsToLog: %s]";
private static final String LOG_BASE_PARAMS_DETAIL = "organizationFiscalCode= %s";

@Autowired private ModelMapper modelMapper;

Expand All @@ -41,7 +40,8 @@ public ResponseEntity<String> getReceiptByIUV(
LOG_BASE_HEADER_INFO,
"GET",
"getReceiptByIUV",
String.format(LOG_BASE_PARAMS_DETAIL, sanitizedOrganizationFiscalCode)
"organizationFiscalCode="
+ sanitizedOrganizationFiscalCode
+ "; iuv= "
+ sanitizedIuv
+ "; validSegregationCodes= "
Expand Down Expand Up @@ -74,15 +74,14 @@ public ResponseEntity<PaymentsResult<ReceiptModelResponse>> getOrganizationRecei
LOG_BASE_HEADER_INFO,
"GET",
"getOrganizationReceipts",
String.format(
LOG_BASE_PARAMS_DETAIL,
sanitizeInput(organizationFiscalCode)
+ "; debtor= "
+ sanitizeInput(debtor)
+ "; service= "
+ sanitizeInput(service)
+ "; validSegregationCodes= "
+ sanitizedSegregationCodes)));
"organizationFiscalCode="
+ sanitizeInput(organizationFiscalCode)
+ "; debtor= "
+ sanitizeInput(debtor)
+ "; service= "
+ sanitizeInput(service)
+ "; validSegregationCodes= "
+ sanitizedSegregationCodes));

ArrayList<String> segCodesList =
segregationCodes != null
Expand Down

0 comments on commit b6b108f

Please sign in to comment.