From 17acd4eb3911049727a5ede342a9a1fe88042bc0 Mon Sep 17 00:00:00 2001 From: Jacopo Date: Thu, 11 Apr 2024 15:55:56 +0200 Subject: [PATCH 1/2] hashcode --- .../gpd/payments/pull/config/LoggingInterceptor.java | 7 ++++++- .../pagopa/gpd/payments/pull/models/PaymentNotice.java | 8 ++++---- .../gpd/payments/pull/resources/PaymentNotices.java | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/main/java/it/gov/pagopa/gpd/payments/pull/config/LoggingInterceptor.java b/src/main/java/it/gov/pagopa/gpd/payments/pull/config/LoggingInterceptor.java index 84bd5c7..ca94c17 100644 --- a/src/main/java/it/gov/pagopa/gpd/payments/pull/config/LoggingInterceptor.java +++ b/src/main/java/it/gov/pagopa/gpd/payments/pull/config/LoggingInterceptor.java @@ -26,7 +26,12 @@ public class LoggingInterceptor { private static String getParams(InvocationContext context) { Map params = new HashMap<>(); for (int i = 0; i < context.getParameters().length; i++) { - params.put(context.getMethod().getParameters()[i].getName(), context.getParameters()[i]); + String name = context.getMethod().getParameters()[i].getName(); + Object value = context.getParameters()[i]; + if("taxCode".equals(name)) { + value = value.hashCode(); + } + params.put(name, value); } return mapToJSON(params); diff --git a/src/main/java/it/gov/pagopa/gpd/payments/pull/models/PaymentNotice.java b/src/main/java/it/gov/pagopa/gpd/payments/pull/models/PaymentNotice.java index 66d636e..0808829 100644 --- a/src/main/java/it/gov/pagopa/gpd/payments/pull/models/PaymentNotice.java +++ b/src/main/java/it/gov/pagopa/gpd/payments/pull/models/PaymentNotice.java @@ -2,10 +2,7 @@ import io.quarkus.runtime.annotations.RegisterForReflection; import it.gov.pagopa.gpd.payments.pull.models.enums.PaymentNoticeStatus; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; import lombok.extern.jackson.Jacksonized; import org.eclipse.microprofile.openapi.annotations.media.Schema; @@ -20,14 +17,17 @@ @Builder @Jacksonized @RegisterForReflection +@ToString public class PaymentNotice implements Serializable { @Schema(description = "Unique ID of the Debt Position (for positions originating from ACA the IUPD starts with ACA_)", required = true) private String iupd; @Schema(description = "Tax code of the person to whom the Debt Position is registered", required = true) + @ToString.Exclude private String debtorTaxCode; @Schema(description = "Full name of the person to whom the Debt Position is registered", required = true) + @ToString.Exclude private String debtorFullName; @Schema(description = "Type of subject to whom the Debt Position " + "is registered (Will be F (Physical) or G(Legal))", required = true) diff --git a/src/main/java/it/gov/pagopa/gpd/payments/pull/resources/PaymentNotices.java b/src/main/java/it/gov/pagopa/gpd/payments/pull/resources/PaymentNotices.java index b030253..a381358 100644 --- a/src/main/java/it/gov/pagopa/gpd/payments/pull/resources/PaymentNotices.java +++ b/src/main/java/it/gov/pagopa/gpd/payments/pull/resources/PaymentNotices.java @@ -94,7 +94,7 @@ public Uni getPaymentNotices( var startTime = System.currentTimeMillis(); Map args = new HashMap<>(); - args.put("taxCode", taxCode); + args.put("taxCode", taxCode.hashCode()); args.put("dueDate", dueDate); args.put("limit", limit); args.put("page", page); From 0a8b503bcb3919073935179ad2e1dce35566a176 Mon Sep 17 00:00:00 2001 From: Jacopo Date: Thu, 11 Apr 2024 16:01:17 +0200 Subject: [PATCH 2/2] fix nullpointer --- openapi/openapi.json | 782 ++++++++---------- .../pull/config/LoggingInterceptor.java | 2 +- .../pull/resources/PaymentNotices.java | 2 +- 3 files changed, 351 insertions(+), 435 deletions(-) diff --git a/openapi/openapi.json b/openapi/openapi.json index b4d2ce8..72cba11 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -1,499 +1,415 @@ { - "openapi": "3.0.3", - "info": { - "title": "gpd-payments-pull", - "description": "GPD Payments Pull Services", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "1.0.9" + "openapi" : "3.0.3", + "info" : { + "title" : "gpd-payments-pull", + "description" : "GPD Payments Pull Services", + "termsOfService" : "https://www.pagopa.gov.it/", + "version" : "1.0.9" }, - "servers": [ - { - "url": "${host}/gpd/payments/pull/api/v1" - } - ], - "tags": [ - { - "name": "Payment Notices", - "description": "Payment Notices Operations" - } - ], - "paths": { - "/info": { - "get": { - "tags": [ - "Generic" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppInfo" + "servers" : [ { + "url" : "${host}/gpd/payments/pull/api/v1" + } ], + "tags" : [ { + "name" : "Payment Notices", + "description" : "Payment Notices Operations" + } ], + "paths" : { + "/info" : { + "get" : { + "tags" : [ "Generic" ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfo" } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": {} + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { } } } } } }, - "/payment-notices/v1": { - "get": { - "tags": [ - "Payment Notices" - ], - "summary": "Get Payment Notices", - "description": "Retrieve payment notices from ACA and GPD sources, filtered by a due date", - "parameters": [ - { - "name": "dueDate", - "in": "query", - "description": "Optional date to filter paymentNotices (if provided use the format yyyy-MM-dd)", - "schema": { - "$ref": "#/components/schemas/LocalDate" - } - }, - { - "name": "limit", - "in": "query", - "description": "Number of elements on one page. Default = 50", - "schema": { - "format": "int32", - "default": "50", - "maximum": 100, - "minimum": 1, - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Page number. Page value starts from 0", - "schema": { - "format": "int32", - "default": "0", - "minimum": 0, - "type": "integer" - } - }, - { - "name": "x-tax-code", - "in": "header", - "description": "Tax code to use for retrieving notices", - "required": true, - "schema": { - "type": "string" - } + "/payment-notices/v1" : { + "get" : { + "tags" : [ "Payment Notices" ], + "summary" : "Get Payment Notices", + "description" : "Retrieve payment notices from ACA and GPD sources, filtered by a due date", + "parameters" : [ { + "name" : "dueDate", + "in" : "query", + "description" : "Optional date to filter paymentNotices (if provided use the format yyyy-MM-dd)", + "schema" : { + "$ref" : "#/components/schemas/LocalDate" + } + }, { + "name" : "limit", + "in" : "query", + "description" : "Number of elements on one page. Default = 50", + "schema" : { + "format" : "int32", + "default" : "50", + "maximum" : 100, + "minimum" : 1, + "type" : "integer" + } + }, { + "name" : "page", + "in" : "query", + "description" : "Page number. Page value starts from 0", + "schema" : { + "format" : "int32", + "default" : "0", + "minimum" : 0, + "type" : "integer" } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentNotice" + }, { + "name" : "x-tax-code", + "in" : "header", + "description" : "Tax code to use for retrieving notices", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PaymentNotice" } } } } }, - "500": { - "$ref": "#/components/responses/InternalServerError" + "500" : { + "$ref" : "#/components/responses/InternalServerError" }, - "400": { - "$ref": "#/components/responses/AppException400" + "400" : { + "$ref" : "#/components/responses/AppException400" } }, - "security": [ - { - "ApiKey": [] - } - ] + "security" : [ { + "ApiKey" : [ ] + } ] } } }, - "components": { - "schemas": { - "AppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - }, - "environment": { - "type": "string" + "components" : { + "schemas" : { + "AppInfo" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "version" : { + "type" : "string" + }, + "environment" : { + "type" : "string" } } }, - "ErrorResponse": { - "type": "object", - "properties": { - "title": { - "type": "string", - "example": "Internal Server Error" - }, - "status": { - "format": "int32", - "type": "integer", - "example": 500 - }, - "detail": { - "type": "string", - "example": "An unexpected error has occurred. Please contact support." - }, - "instance": { - "type": "string", - "example": "PN-500" + "ErrorResponse" : { + "type" : "object", + "properties" : { + "title" : { + "type" : "string", + "example" : "Internal Server Error" + }, + "status" : { + "format" : "int32", + "type" : "integer", + "example" : 500 + }, + "detail" : { + "type" : "string", + "example" : "An unexpected error has occurred. Please contact support." + }, + "instance" : { + "type" : "string", + "example" : "PN-500" } } }, - "Installment": { - "required": [ - "nav", - "iuv", - "paTaxCode", - "paFullName", - "amount", - "description", - "dueDate", - "insertedDate", - "status", - "lastUpdatedDate" - ], - "type": "object", - "properties": { - "nav": { - "description": "Notice Code", - "type": "string" - }, - "iuv": { - "description": "Unique identifier", - "type": "string" - }, - "paTaxCode": { - "description": "Tax code of the Creditor Body", - "type": "string" - }, - "paFullName": { - "description": "Company name of the Creditor Body", - "type": "string" - }, - "amount": { - "format": "int64", - "description": "Payment Option Amount", - "type": "integer" - }, - "description": { - "description": "Description of the OP (e.g. \"SISA - 741T, 942T - Checks without authorization or funding\")", - "type": "string" - }, - "dueDate": { - "allOf": [ - { - "$ref": "#/components/schemas/LocalDateTime" - }, - { - "description": "Is the date by which (TO) the Payment option is payable." - } - ] - }, - "retentionDate": { - "allOf": [ - { - "$ref": "#/components/schemas/LocalDateTime" - }, - { - "description": "Not currently used in any logic. The purpose of this date will be to give the possibility to specify a time period after the dueDate within which a payment option, even if expired, will still be payable." - } - ] - }, - "insertedDate": { - "allOf": [ - { - "$ref": "#/components/schemas/LocalDateTime" - }, - { - "description": "date of insertion of the OP" - } - ] - }, - "notificationFee": { - "format": "int64", - "description": "corresponds to the SEND notification costs", - "type": "integer" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/PaymentOptionStatus" - }, - { - "description": "Status of the OP" - } - ] - }, - "lastUpdatedDate": { - "allOf": [ - { - "$ref": "#/components/schemas/LocalDateTime" - }, - { - "description": "OP update date" - } - ] + "Installment" : { + "required" : [ "nav", "iuv", "paTaxCode", "paFullName", "amount", "description", "dueDate", "insertedDate", "status", "lastUpdatedDate" ], + "type" : "object", + "properties" : { + "nav" : { + "description" : "Notice Code", + "type" : "string" + }, + "iuv" : { + "description" : "Unique identifier", + "type" : "string" + }, + "paTaxCode" : { + "description" : "Tax code of the Creditor Body", + "type" : "string" + }, + "paFullName" : { + "description" : "Company name of the Creditor Body", + "type" : "string" + }, + "amount" : { + "format" : "int64", + "description" : "Payment Option Amount", + "type" : "integer" + }, + "description" : { + "description" : "Description of the OP (e.g. \"SISA - 741T, 942T - Checks without authorization or funding\")", + "type" : "string" + }, + "dueDate" : { + "allOf" : [ { + "$ref" : "#/components/schemas/LocalDateTime" + }, { + "description" : "Is the date by which (TO) the Payment option is payable." + } ] + }, + "retentionDate" : { + "allOf" : [ { + "$ref" : "#/components/schemas/LocalDateTime" + }, { + "description" : "Not currently used in any logic. The purpose of this date will be to give the possibility to specify a time period after the dueDate within which a payment option, even if expired, will still be payable." + } ] + }, + "insertedDate" : { + "allOf" : [ { + "$ref" : "#/components/schemas/LocalDateTime" + }, { + "description" : "date of insertion of the OP" + } ] + }, + "notificationFee" : { + "format" : "int64", + "description" : "corresponds to the SEND notification costs", + "type" : "integer" + }, + "status" : { + "allOf" : [ { + "$ref" : "#/components/schemas/PaymentOptionStatus" + }, { + "description" : "Status of the OP" + } ] + }, + "lastUpdatedDate" : { + "allOf" : [ { + "$ref" : "#/components/schemas/LocalDateTime" + }, { + "description" : "OP update date" + } ] } } }, - "LocalDate": { - "format": "date", - "type": "string", - "example": "2022-03-10" + "LocalDate" : { + "format" : "date", + "type" : "string", + "example" : "2022-03-10" }, - "LocalDateTime": { - "format": "date-time", - "type": "string", - "example": "2022-03-10T12:15:50" + "LocalDateTime" : { + "format" : "date-time", + "type" : "string", + "example" : "2022-03-10T12:15:50" }, - "PaymentNotice": { - "required": [ - "iupd", - "debtorTaxCode", - "debtorFullName", - "debtorType", - "paTaxCode", - "paFullName", - "insertedDate", - "publishDate", - "validityDate", - "status", - "lastUpdateDate", - "paymentOptions" - ], - "type": "object", - "properties": { - "iupd": { - "description": "Unique ID of the Debt Position (for positions originating from ACA the IUPD starts with ACA_)", - "type": "string" - }, - "debtorTaxCode": { - "description": "Tax code of the person to whom the Debt Position is registered", - "type": "string" - }, - "debtorFullName": { - "description": "Full name of the person to whom the Debt Position is registered", - "type": "string" - }, - "debtorType": { - "description": "Type of subject to whom the Debt Position is registered (Will be F (Physical) or G(Legal))", - "type": "string" - }, - "paTaxCode": { - "description": "Tax code of the Creditor Body", - "type": "string" - }, - "paFullName": { - "description": "Company name of the Creditor Body", - "type": "string" - }, - "insertedDate": { - "allOf": [ - { - "$ref": "#/components/schemas/LocalDateTime" - }, - { - "description": "Date of entry of the Debt Position" - } - ] - }, - "publishDate": { - "allOf": [ - { - "$ref": "#/components/schemas/LocalDateTime" - }, - { - "description": "Date of publication of the Debt Position. In the case of Positions created by ACA it corresponds to the insertion date." - } - ] - }, - "validityDate": { - "allOf": [ - { - "$ref": "#/components/schemas/LocalDateTime" - }, - { - "description": "Start date of validity of the Debt Position. if set to null it goes directly to valid when publishing" - } - ] - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/PaymentNoticeStatus" - }, - { - "description": "State of the Debt Position. Will be\nVALID\n or\nPARTIALLY_PAID" - } - ] - }, - "lastUpdateDate": { - "allOf": [ - { - "$ref": "#/components/schemas/LocalDate" - }, - { - "description": "Date of update of the Debt Position" - } - ] - }, - "paymentOptions": { - "description": "Array structure containing any payment options (there always exists at least 1)", - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentOption" + "PaymentNotice" : { + "required" : [ "iupd", "debtorTaxCode", "debtorFullName", "debtorType", "paTaxCode", "paFullName", "insertedDate", "publishDate", "validityDate", "status", "lastUpdateDate", "paymentOptions" ], + "type" : "object", + "properties" : { + "iupd" : { + "description" : "Unique ID of the Debt Position (for positions originating from ACA the IUPD starts with ACA_)", + "type" : "string" + }, + "debtorTaxCode" : { + "description" : "Tax code of the person to whom the Debt Position is registered", + "type" : "string" + }, + "debtorFullName" : { + "description" : "Full name of the person to whom the Debt Position is registered", + "type" : "string" + }, + "debtorType" : { + "description" : "Type of subject to whom the Debt Position is registered (Will be F (Physical) or G(Legal))", + "type" : "string" + }, + "paTaxCode" : { + "description" : "Tax code of the Creditor Body", + "type" : "string" + }, + "paFullName" : { + "description" : "Company name of the Creditor Body", + "type" : "string" + }, + "insertedDate" : { + "allOf" : [ { + "$ref" : "#/components/schemas/LocalDateTime" + }, { + "description" : "Date of entry of the Debt Position" + } ] + }, + "publishDate" : { + "allOf" : [ { + "$ref" : "#/components/schemas/LocalDateTime" + }, { + "description" : "Date of publication of the Debt Position. In the case of Positions created by ACA it corresponds to the insertion date." + } ] + }, + "validityDate" : { + "allOf" : [ { + "$ref" : "#/components/schemas/LocalDateTime" + }, { + "description" : "Start date of validity of the Debt Position. if set to null it goes directly to valid when publishing" + } ] + }, + "status" : { + "allOf" : [ { + "$ref" : "#/components/schemas/PaymentNoticeStatus" + }, { + "description" : "State of the Debt Position. Will be\nVALID\n or\nPARTIALLY_PAID" + } ] + }, + "lastUpdateDate" : { + "allOf" : [ { + "$ref" : "#/components/schemas/LocalDate" + }, { + "description" : "Date of update of the Debt Position" + } ] + }, + "paymentOptions" : { + "description" : "Array structure containing any payment options (there always exists at least 1)", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PaymentOption" } } } }, - "PaymentNoticeStatus": { - "enum": [ - "VALID", - "PARTIALLY_PAID" - ], - "type": "string" + "PaymentNoticeStatus" : { + "enum" : [ "VALID", "PARTIALLY_PAID" ], + "type" : "string" }, - "PaymentOption": { - "required": [ - "numberOfInstallments", - "switchToExpired", - "installments" - ], - "type": "object", - "properties": { - "description": { - "description": "Description of the payment option", - "type": "string" - }, - "numberOfInstallments": { - "format": "int32", - "description": "Number of installments that make up the payment option, if equal to 1 it is a single payment", - "type": "integer" - }, - "amount": { - "format": "int64", - "description": "total amount for the payment option", - "type": "integer" - }, - "dueDate": { - "allOf": [ - { - "$ref": "#/components/schemas/LocalDateTime" - }, - { - "description": "Is the date by which the Payment option is payable." - } - ] - }, - "isPartialPayment": { - "description": "Indicates whether the OP is part of an installment plan", - "type": "boolean" - }, - "switchToExpired": { - "description": "Indicates, if set to true, in the case of PD created on GPD, that once the expiration date (dueDate ) has passed the PD is automatically set to the expired status", - "type": "boolean" - }, - "installments": { - "description": "Array structure containing the installments that make up the payment option (there always exists at least 1)", - "type": "array", - "items": { - "$ref": "#/components/schemas/Installment" + "PaymentOption" : { + "required" : [ "numberOfInstallments", "switchToExpired", "installments" ], + "type" : "object", + "properties" : { + "description" : { + "description" : "Description of the payment option", + "type" : "string" + }, + "numberOfInstallments" : { + "format" : "int32", + "description" : "Number of installments that make up the payment option, if equal to 1 it is a single payment", + "type" : "integer" + }, + "amount" : { + "format" : "int64", + "description" : "total amount for the payment option", + "type" : "integer" + }, + "dueDate" : { + "allOf" : [ { + "$ref" : "#/components/schemas/LocalDateTime" + }, { + "description" : "Is the date by which the Payment option is payable." + } ] + }, + "isPartialPayment" : { + "description" : "Indicates whether the OP is part of an installment plan", + "type" : "boolean" + }, + "switchToExpired" : { + "description" : "Indicates, if set to true, in the case of PD created on GPD, that once the expiration date (dueDate ) has passed the PD is automatically set to the expired status", + "type" : "boolean" + }, + "installments" : { + "description" : "Array structure containing the installments that make up the payment option (there always exists at least 1)", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Installment" } } } }, - "PaymentOptionStatus": { - "enum": [ - "PO_UNPAID", - "PO_PAID", - "PO_PARTIALLY_REPORTED", - "PO_REPORTED" - ], - "type": "string" + "PaymentOptionStatus" : { + "enum" : [ "PO_UNPAID", "PO_PAID", "PO_PARTIALLY_REPORTED", "PO_REPORTED" ], + "type" : "string" } }, - "responses": { - "AppException400": { - "description": "Default app exception for status 400", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "responses" : { + "AppException400" : { + "description" : "Default app exception for status 400", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" }, - "examples": { - "Error": { - "value": { - "type": "", - "title": "Bad Request", - "status": 400, - "detail": "The provided due date [] is invalid", - "instance": "PPL_703" + "examples" : { + "Error" : { + "value" : { + "type" : "", + "title" : "Bad Request", + "status" : 400, + "detail" : "The provided due date [] is invalid", + "instance" : "PPL_703" } } } } } }, - "AppException404": { - "description": "Default app exception for status 404", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "AppException404" : { + "description" : "Default app exception for status 404", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" }, - "example": { - "type": "", - "title": "Not Found", - "status": 404, - "detail": "Payment Notice [] not found", - "instance": "PPL_900" + "example" : { + "type" : "", + "title" : "Not Found", + "status" : 404, + "detail" : "Payment Notice [] not found", + "instance" : "PPL_900" } } } }, - "InternalServerError": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "InternalServerError" : { + "description" : "Internal Server Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" }, - "example": { - "type": "", - "title": "Internal Server Error", - "status": 500, - "detail": "An unexpected error has occurred. Please contact support.", - "instance": "PPL_603" + "example" : { + "type" : "", + "title" : "Internal Server Error", + "status" : 500, + "detail" : "An unexpected error has occurred. Please contact support.", + "instance" : "PPL_603" } } } } }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "name": "Ocp-Apim-Subscription-Key" + "securitySchemes" : { + "ApiKey" : { + "type" : "apiKey", + "name" : "Ocp-Apim-Subscription-Key" } } } -} +} \ No newline at end of file diff --git a/src/main/java/it/gov/pagopa/gpd/payments/pull/config/LoggingInterceptor.java b/src/main/java/it/gov/pagopa/gpd/payments/pull/config/LoggingInterceptor.java index ca94c17..677f650 100644 --- a/src/main/java/it/gov/pagopa/gpd/payments/pull/config/LoggingInterceptor.java +++ b/src/main/java/it/gov/pagopa/gpd/payments/pull/config/LoggingInterceptor.java @@ -28,7 +28,7 @@ private static String getParams(InvocationContext context) { for (int i = 0; i < context.getParameters().length; i++) { String name = context.getMethod().getParameters()[i].getName(); Object value = context.getParameters()[i]; - if("taxCode".equals(name)) { + if("taxCode".equals(name) && value != null) { value = value.hashCode(); } params.put(name, value); diff --git a/src/main/java/it/gov/pagopa/gpd/payments/pull/resources/PaymentNotices.java b/src/main/java/it/gov/pagopa/gpd/payments/pull/resources/PaymentNotices.java index a381358..8001033 100644 --- a/src/main/java/it/gov/pagopa/gpd/payments/pull/resources/PaymentNotices.java +++ b/src/main/java/it/gov/pagopa/gpd/payments/pull/resources/PaymentNotices.java @@ -94,7 +94,7 @@ public Uni getPaymentNotices( var startTime = System.currentTimeMillis(); Map args = new HashMap<>(); - args.put("taxCode", taxCode.hashCode()); + args.put("taxCode", taxCode != null ? taxCode.hashCode() : "null"); args.put("dueDate", dueDate); args.put("limit", limit); args.put("page", page);