Repository: pagopa/pn-delivery-push
Pull request #1273: [PN-14786] Refactor: sonar clean
Author: login: CapolongoDa
Created: 2025-05-09T15:01:29Z | Merged: 2025-05-12T13:14:37Z



Diff:
diff --git a/config/application.properties b/config/application.properties
index bd55fea5e..c2abe8913 100644
--- a/config/application.properties
+++ b/config/application.properties
@@ -22,7 +22,6 @@ lollipop.active=false
 pn.delivery-push.topics.new-notifications=local-delivery-push-inputs.fifo
 pn.delivery-push.topics.from-external-channel=local-ext-channels-outputs
 pn.delivery-push.topics.scheduled-actions=local-delivery-push-actions
-pn.delivery-push.topics.executed-actions=local-delivery-push-actions-done
 pn.delivery-push.topics.safe-storage-events=local-delivery-push-safestorage-inputs
 pn.delivery-push.topics.national-registries-events=local-national-registries-gateway
 pn.delivery-push.topics.address-manager-events=local-address-manager-to-delivery-push
diff --git a/scripts/aws/cfn/microservice.yml b/scripts/aws/cfn/microservice.yml
index 09167ec66..ca5a6b77f 100644
--- a/scripts/aws/cfn/microservice.yml
+++ b/scripts/aws/cfn/microservice.yml
@@ -841,8 +841,8 @@ Resources:
         #ContainerEnvEntry4: !Sub 'PN_DELIVERYPUSH_WEBAPP_DIRECTACCESSURLTEMPLATELEGAL=${LegalPersonPortalUrl}'
         ContainerEnvEntry5: !Sub 'PN_DELIVERYPUSH_PAPERCHANNELBASEURL=http://${ApplicationLoadBalancerDomain}:8080'
         ContainerEnvEntry6: !Sub 'PN_DELIVERYPUSH_TOPICS_FROMEXTERNALCHANNEL=${ExternalChannelsOutputsQueueName}'
-        ContainerEnvEntry7: !Sub 'PN_DELIVERYPUSH_TOPICS_SCHEDULEDACTIONS=${ScheduledActionsQueueName}'
-        ContainerEnvEntry8: !Sub 'PN_DELIVERYPUSH_TOPICS_EXECUTEDACTIONS=${DoneActionsQueueName}'
+        ContainerEnvEntry7: !Sub 'PN_DELIVERYPUSH_TOPICS_SCHEDULEDACTIONS=${ScheduledActionsQueueName}'#DA COMMENTARE DOPO RIMOZIONE WEBHOOK
+        #ContainerEnvEntry8: !Sub 'PN_DELIVERYPUSH_TOPICS_EXECUTEDACTIONS=${DoneActionsQueueName}'
         #ContainerEnvEntry9: !Sub 'PN_DELIVERYPUSH_WEBHOOK_SCHEDULEINTERVAL=${WebhookScanInterval}'
         #ContainerEnvEntry10: !Sub 'PN_DELIVERYPUSH_WEBHOOK_MAXLENGTH=${WebhookMaxLength}'
         #ContainerEnvEntry11: 'PN_DELIVERYPUSH_WEBAPP_QUICKACCESSURLAARDETAILSUFFIX=?aar'
@@ -974,8 +974,8 @@ Resources:
         #ContainerEnvEntry4: !Sub 'PN_DELIVERYPUSH_WEBAPP_DIRECTACCESSURLTEMPLATELEGAL=${LegalPersonPortalUrl}'
         ContainerEnvEntry5: !Sub 'PN_DELIVERYPUSH_PAPERCHANNELBASEURL=http://${ApplicationLoadBalancerDomain}:8080'
         ContainerEnvEntry6: !Sub 'PN_DELIVERYPUSH_TOPICS_FROMEXTERNALCHANNEL=${ExternalChannelsOutputsQueueName}'
-        ContainerEnvEntry7: !Sub 'PN_DELIVERYPUSH_TOPICS_SCHEDULEDACTIONS=${ScheduledActionsQueueName}'
-        ContainerEnvEntry8: !Sub 'PN_DELIVERYPUSH_TOPICS_EXECUTEDACTIONS=${DoneActionsQueueName}'
+        ContainerEnvEntry7: !Sub 'PN_DELIVERYPUSH_TOPICS_SCHEDULEDACTIONS=${ScheduledActionsQueueName}' #DA COMMENTARE DOPO RIMOZIONE WEBHOOK
+        #ContainerEnvEntry8: !Sub 'PN_DELIVERYPUSH_TOPICS_EXECUTEDACTIONS=${DoneActionsQueueName}'
         #ContainerEnvEntry9: !Sub 'PN_DELIVERYPUSH_WEBHOOK_SCHEDULEINTERVAL=${WebhookScanInterval}'
         #ContainerEnvEntry10: !Sub 'PN_DELIVERYPUSH_WEBHOOK_MAXLENGTH=${WebhookMaxLength}'
         #ContainerEnvEntry11: 'PN_DELIVERYPUSH_WEBAPP_QUICKACCESSURLAARDETAILSUFFIX=?aar'
@@ -1112,8 +1112,8 @@ Resources:
         #ContainerEnvEntry4: !Sub 'PN_DELIVERYPUSH_WEBAPP_DIRECTACCESSURLTEMPLATELEGAL=${LegalPersonPortalUrl}'
         ContainerEnvEntry5: !Sub 'PN_DELIVERYPUSH_PAPERCHANNELBASEURL=http://${ApplicationLoadBalancerDomain}:8080'
         ContainerEnvEntry6: !Sub 'PN_DELIVERYPUSH_TOPICS_FROMEXTERNALCHANNEL=${ExternalChannelsOutputsQueueName}'
-        ContainerEnvEntry7: !Sub 'PN_DELIVERYPUSH_TOPICS_SCHEDULEDACTIONS=${ScheduledActionsQueueName}'
-        ContainerEnvEntry8: !Sub 'PN_DELIVERYPUSH_TOPICS_EXECUTEDACTIONS=${DoneActionsQueueName}'
+        ContainerEnvEntry7: !Sub 'PN_DELIVERYPUSH_TOPICS_SCHEDULEDACTIONS=${ScheduledActionsQueueName}' #DA COMMENTARE DOPO RIMOZIONE WEBHOOK
+        #ContainerEnvEntry8: !Sub 'PN_DELIVERYPUSH_TOPICS_EXECUTEDACTIONS=${DoneActionsQueueName}'
         #ContainerEnvEntry9: !Sub 'PN_DELIVERYPUSH_WEBHOOK_SCHEDULEINTERVAL=${WebhookScanInterval}'
         #ContainerEnvEntry10: !Sub 'PN_DELIVERYPUSH_WEBHOOK_MAXLENGTH=${WebhookMaxLength}'
         #ContainerEnvEntry11: 'PN_DELIVERYPUSH_WEBAPP_QUICKACCESSURLAARDETAILSUFFIX=?aar'
@@ -1960,6 +1960,9 @@ Resources:
       FunctionName: !Ref NotificationCancellationActionInsertLambda
       FunctionResponseTypes:
         - ReportBatchItemFailures
+      FilterCriteria:
+        Filters:
+          - Pattern: '{ "data" : { "tableName" : [ "pn-Timelines" ], "eventName": [ "INSERT" ] } }'
       MaximumBatchingWindowInSeconds: !Sub ${NotificationCancellationActionInsertLambdaMaximumBatchingWindowInSeconds}
       StartingPosition: TRIM_HORIZON
       DestinationConfig:
@@ -2066,6 +2069,9 @@ Resources:
       FunctionName: !Ref PaperEventsCostUpdateLambda
       FunctionResponseTypes:
         - ReportBatchItemFailures
+      FilterCriteria:
+        Filters:
+          - Pattern: '{ "data" : { "tableName" : [ "pn-Timelines" ], "eventName": [ "INSERT" ] } }'
       MaximumBatchingWindowInSeconds: !Sub ${PaperEventsCostUpdateLambdaMaximumBatchingWindowInSeconds}
       StartingPosition: TRIM_HORIZON
       DestinationConfig:
diff --git a/src/main/java/it/pagopa/pn/deliverypush/action/startworkflow/notificationvalidation/NotificationValidationActionHandler.java b/src/main/java/it/pagopa/pn/deliverypush/action/startworkflow/notificationvalidation/NotificationValidationActionHandler.java
index 271dec1ba..e086ecfef 100644
--- a/src/main/java/it/pagopa/pn/deliverypush/action/startworkflow/notificationvalidation/NotificationValidationActionHandler.java
+++ b/src/main/java/it/pagopa/pn/deliverypush/action/startworkflow/notificationvalidation/NotificationValidationActionHandler.java
@@ -281,7 +281,7 @@ private void checkDocumentsMaxPageNumber(NotificationInt notification, int maxPa
                             safeStorageService.getFile(ref.getKey(), false)
                                     .onErrorResume(PnFileNotFoundException.class, this::handleNotFoundError))
                     .block();
-            byte[] pieceOfContent = safeStorageService.downloadPieceOfContent(fd.getKey(), fd.getDownload().getUrl(), -1).block();
+            byte[] pieceOfContent = safeStorageService.downloadPieceOfContent(Objects.requireNonNull(fd).getKey(), fd.getDownload().getUrl(), -1).block();
             int actualPages = documentComposition.getNumberOfPageFromPdfBytes(pieceOfContent);
             if (actualPages > maxPages) {
                 final String errorDetail = String.format(messageFormat,
diff --git a/src/main/java/it/pagopa/pn/deliverypush/config/PnDeliveryPushConfigs.java b/src/main/java/it/pagopa/pn/deliverypush/config/PnDeliveryPushConfigs.java
index 139058878..22dc9c0a7 100644
--- a/src/main/java/it/pagopa/pn/deliverypush/config/PnDeliveryPushConfigs.java
+++ b/src/main/java/it/pagopa/pn/deliverypush/config/PnDeliveryPushConfigs.java
@@ -150,11 +150,9 @@ public class PnDeliveryPushConfigs {
     public static class Topics {
 
         private String newNotifications;
-
+        // TODO: da rimuovere dopo l'eliminazione di webhook.
         private String scheduledActions;
 
-        private String executedActions;
-
         private String toExternalChannelPec;
         
         private String toExternalChannelEmail;
diff --git a/src/main/java/it/pagopa/pn/deliverypush/exceptions/PnWebhookMaxStreamsCountReachedException.java b/src/main/java/it/pagopa/pn/deliverypush/exceptions/PnWebhookMaxStreamsCountReachedException.java
index f0a1d0d39..316e51e4d 100644
--- a/src/main/java/it/pagopa/pn/deliverypush/exceptions/PnWebhookMaxStreamsCountReachedException.java
+++ b/src/main/java/it/pagopa/pn/deliverypush/exceptions/PnWebhookMaxStreamsCountReachedException.java
@@ -4,10 +4,10 @@
 
 public class PnWebhookMaxStreamsCountReachedException extends PnRuntimeException {
 
-    final static String message = "Max streams count reached for PA";
+    static final String MESSAGE = "Max streams count reached for PA";
 
     public PnWebhookMaxStreamsCountReachedException() {
-        super(message, PnDeliveryPushExceptionCodes.ERROR_CODE_WEBHOOK_MAXSTREAMSCOUNTREACHED, 409, PnDeliveryPushExceptionCodes.ERROR_CODE_WEBHOOK_MAXSTREAMSCOUNTREACHED, null, message);
+        super(MESSAGE, PnDeliveryPushExceptionCodes.ERROR_CODE_WEBHOOK_MAXSTREAMSCOUNTREACHED, 409, PnDeliveryPushExceptionCodes.ERROR_CODE_WEBHOOK_MAXSTREAMSCOUNTREACHED, null, MESSAGE);
     }
 
 }
diff --git a/src/main/java/it/pagopa/pn/deliverypush/middleware/PnDeliveryPushMiddlewareConfigs.java b/src/main/java/it/pagopa/pn/deliverypush/middleware/PnDeliveryPushMiddlewareConfigs.java
index a31edbaf6..3e6f200a2 100644
--- a/src/main/java/it/pagopa/pn/deliverypush/middleware/PnDeliveryPushMiddlewareConfigs.java
+++ b/src/main/java/it/pagopa/pn/deliverypush/middleware/PnDeliveryPushMiddlewareConfigs.java
@@ -3,12 +3,9 @@
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 import it.pagopa.pn.deliverypush.config.PnDeliveryPushConfigs;
-import it.pagopa.pn.deliverypush.middleware.queue.producer.action.sqs.SqsActionProducer;
 import it.pagopa.pn.deliverypush.middleware.queue.producer.webhook.sqs.SqsWebhookProducer;
-import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Primary;
 import software.amazon.awssdk.services.sqs.SqsClient;
 
 @Configuration
@@ -20,16 +17,6 @@ public PnDeliveryPushMiddlewareConfigs(PnDeliveryPushConfigs cfg) {
         this.cfg = cfg;
     }
 
-    @Bean @Primary
-    public SqsActionProducer actionsEventProducer(SqsClient sqs, ObjectMapper objMapper) {
-        return new SqsActionProducer( sqs, cfg.getTopics().getScheduledActions(), objMapper);
-    }
-
-    @Bean @Qualifier("action-done")
-    public SqsActionProducer actionsDoneEventProducer(SqsClient sqs, ObjectMapper objMapper) {
-        return new SqsActionProducer( sqs, cfg.getTopics().getExecutedActions(), objMapper);
-    }
-
     @Bean
     public SqsWebhookProducer webhookActionsEventProducer(SqsClient sqs, ObjectMapper objMapper) {
         return new SqsWebhookProducer( sqs, cfg.getTopics().getScheduledActions(), objMapper);
diff --git a/src/main/java/it/pagopa/pn/deliverypush/middleware/queue/producer/abstractions/actionspool/impl/ActionEvent.java b/src/main/java/it/pagopa/pn/deliverypush/middleware/queue/producer/abstractions/actionspool/impl/ActionEvent.java
deleted file mode 100644
index 651027bc4..000000000
--- a/src/main/java/it/pagopa/pn/deliverypush/middleware/queue/producer/abstractions/actionspool/impl/ActionEvent.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package it.pagopa.pn.deliverypush.middleware.queue.producer.abstractions.actionspool.impl;
-
-import it.pagopa.pn.api.dto.events.GenericEvent;
-import it.pagopa.pn.api.dto.events.StandardEventHeader;
-import it.pagopa.pn.deliverypush.middleware.queue.producer.abstractions.actionspool.Action;
-import lombok.*;
-
-@NoArgsConstructor
-@AllArgsConstructor
-@Getter
-@Builder(toBuilder = true)
-@EqualsAndHashCode
-@ToString
-public class ActionEvent implements GenericEvent<StandardEventHeader, Action> {
-
-    private StandardEventHeader header;
-
-    private Action payload;
-}
diff --git a/src/main/java/it/pagopa/pn/deliverypush/middleware/queue/producer/abstractions/actionspool/impl/ActionEventType.java b/src/main/java/it/pagopa/pn/deliverypush/middleware/queue/producer/abstractions/actionspool/impl/ActionEventType.java
index ed34f4c79..99678eda3 100644
--- a/src/main/java/it/pagopa/pn/deliverypush/middleware/queue/producer/abstractions/actionspool/impl/ActionEventType.java
+++ b/src/main/java/it/pagopa/pn/deliverypush/middleware/queue/producer/abstractions/actionspool/impl/ActionEventType.java
@@ -1,18 +1,6 @@
 package it.pagopa.pn.deliverypush.middleware.queue.producer.abstractions.actionspool.impl;
 
-import it.pagopa.pn.api.dto.events.IEventType;
-
-public enum ActionEventType implements IEventType {
-    ACTION_GENERIC( ActionEvent.class );
-
-    private final Class<?> eventClass;
-
-    ActionEventType( Class<?> eventClass) {
-        this.eventClass = eventClass;
-    }
-
-    public Class<?> getEventJavaClass() {
-        return eventClass;
-    }
 
+public enum ActionEventType {
+    ACTION_GENERIC
 }
diff --git a/src/main/java/it/pagopa/pn/deliverypush/middleware/queue/producer/abstractions/actionspool/impl/ActionsPoolImpl.java b/src/main/java/it/pagopa/pn/deliverypush/middleware/queue/producer/abstractions/actionspool/impl/ActionsPoolImpl.java
index af3ab5320..d58c21db5 100644
--- a/src/main/java/it/pagopa/pn/deliverypush/middleware/queue/producer/abstractions/actionspool/impl/ActionsPoolImpl.java
+++ b/src/main/java/it/pagopa/pn/deliverypush/middleware/queue/producer/abstractions/actionspool/impl/ActionsPoolImpl.java
@@ -9,7 +9,6 @@
 import java.time.Instant;
 import java.time.OffsetDateTime;
 import java.time.ZoneOffset;
-import java.time.temporal.ChronoField;
 
 @Service
 @CustomLog
@@ -30,13 +29,13 @@ public void addOnlyAction(Action action){
     }
 
     private String computeTimeSlot(Instant instant) {
-        OffsetDateTime nowUtc = instant.atOffset( ZoneOffset.UTC );
-        int year = nowUtc.get( ChronoField.YEAR_OF_ERA );
-        int month = nowUtc.get( ChronoField.MONTH_OF_YEAR );
-        int day = nowUtc.get( ChronoField.DAY_OF_MONTH );
-        int hour = nowUtc.get( ChronoField.HOUR_OF_DAY );
-        int minute = nowUtc.get( ChronoField.MINUTE_OF_HOUR );
-        return String.format("%04d-%02d-%02dT%02d:%02d", year, month, day, hour, minute);
+        OffsetDateTime nowUtc = instant.atOffset(ZoneOffset.UTC);
+        return String.format("%04d-%02d-%02dT%02d:%02d",
+                nowUtc.getYear(),
+                nowUtc.getMonthValue(),
+                nowUtc.getDayOfMonth(),
+                nowUtc.getHour(),
+                nowUtc.getMinute());
     }
 
     @Override
diff --git a/src/main/java/it/pagopa/pn/deliverypush/middleware/queue/producer/action/sqs/SqsActionProducer.java b/src/main/java/it/pagopa/pn/deliverypush/middleware/queue/producer/action/sqs/SqsActionProducer.java
deleted file mode 100644
index b3ad76333..000000000
--- a/src/main/java/it/pagopa/pn/deliverypush/middleware/queue/producer/action/sqs/SqsActionProducer.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package it.pagopa.pn.deliverypush.middleware.queue.producer.action.sqs;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import it.pagopa.pn.api.dto.events.AbstractSqsMomProducer;
-import it.pagopa.pn.deliverypush.middleware.queue.producer.abstractions.actionspool.impl.ActionEvent;
-import software.amazon.awssdk.services.sqs.SqsClient;
-
-public class SqsActionProducer extends AbstractSqsMomProducer<ActionEvent> {
-
-    public SqsActionProducer(SqsClient sqsClient, String topic, ObjectMapper objectMapper ) {
-        super(sqsClient, topic, objectMapper, ActionEvent.class );
-    }
-}
diff --git a/src/test/java/Test.java b/src/test/java/Test.java
deleted file mode 100644
index 0e2a9c36a..000000000
--- a/src/test/java/Test.java
+++ /dev/null
@@ -1,47 +0,0 @@
-import it.pagopa.pn.deliverypush.dto.address.PhysicalAddressInt;
-import it.pagopa.pn.deliverypush.dto.timeline.details.NormalizedAddressDetailsInt;
-import it.pagopa.pn.deliverypush.dto.timeline.details.NotHandledDetailsInt;
-import it.pagopa.pn.deliverypush.dto.timeline.details.NotificationCancelledDetailsInt;
-import it.pagopa.pn.deliverypush.generated.openapi.server.v1.dto.TimelineElementDetailsV26;
-import it.pagopa.pn.deliverypush.service.mapper.SmartMapper;
-import java.util.ArrayList;
-import java.util.List;
-
-public class Test {
-
-    public static void main(String[] args){
-
-        NormalizedAddressDetailsInt normalizedAddressDetailsInt = new NormalizedAddressDetailsInt();
-        normalizedAddressDetailsInt.setRecIndex(1);
-        var address = new PhysicalAddressInt();
-        address.setFullname("ivan");
-        normalizedAddressDetailsInt.setNewAddress(address);
-        var x =SmartMapper.mapToClass(normalizedAddressDetailsInt, TimelineElementDetailsV26.class);
-
-
-        NotificationCancelledDetailsInt source = new NotificationCancelledDetailsInt();
-        List<Integer> list = new ArrayList<>();
-        list.add(1);
-        source.setNotRefinedRecipientIndexes(list);
-        source.setNotificationCost(100);
-
-        TimelineElementDetailsV26 ret = SmartMapper.mapToClass(source, TimelineElementDetailsV26.class);
-
-        System.out.println("ret = "+ret);
-
-        source.getNotRefinedRecipientIndexes().clear();
-        ret = SmartMapper.mapToClass(source, TimelineElementDetailsV26.class);
-
-
-        System.out.println("ret = "+ret);
-        NotHandledDetailsInt altro = new NotHandledDetailsInt();
-        altro.setReason("test");
-        ret = SmartMapper.mapToClass(altro, TimelineElementDetailsV26.class);
-
-        System.out.println("ret = "+ret);
-
-    }
-
-
-
-}
diff --git a/src/test/java/it/pagopa/pn/deliverypush/MockAWSObjectsTest.java b/src/test/java/it/pagopa/pn/deliverypush/MockAWSObjectsTest.java
index 8b0655d73..3fe88c4f2 100644
--- a/src/test/java/it/pagopa/pn/deliverypush/MockAWSObjectsTest.java
+++ b/src/test/java/it/pagopa/pn/deliverypush/MockAWSObjectsTest.java
@@ -4,7 +4,6 @@
 import io.awspring.cloud.autoconfigure.messaging.SqsAutoConfiguration;
 import it.pagopa.pn.api.dto.events.MomProducer;
 import it.pagopa.pn.deliverypush.middleware.queue.consumer.PnEventInboundService;
-import it.pagopa.pn.deliverypush.middleware.queue.producer.abstractions.actionspool.impl.ActionEvent;
 import it.pagopa.pn.deliverypush.middleware.queue.producer.abstractions.webhookspool.impl.WebhookEvent;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.test.mock.mockito.MockBean;
@@ -14,18 +13,12 @@
 @EnableAutoConfiguration(exclude= {SqsAutoConfiguration.class, ContextFunctionCatalogAutoConfiguration.class})
 public abstract class MockAWSObjectsTest extends MockActionPoolTest {
 
-    @MockBean(name = "actionsEventProducer")
-    private MomProducer<ActionEvent> actionsEventProducer;
-
     @MockBean(name = "webhookActionsEventProducer")
     private MomProducer<WebhookEvent> webhookActionsEventProducer;
 
     @MockBean
     private AmazonSQSAsync amazonSQS;
 
-    @MockBean(name = "actionsDoneEventProducer")
-    private MomProducer<ActionEvent> actionsDoneEventProducer;
-
     @MockBean
     private PnEventInboundService pnEventInboundService;
 
diff --git a/src/test/java/it/pagopa/pn/deliverypush/action/digitalworkflow/DigitalWorkFlowHandlerTest.java b/src/test/java/it/pagopa/pn/deliverypush/action/digitalworkflow/DigitalWorkFlowHandlerTest.java
index 90ef74b79..9193e90ad 100644
--- a/src/test/java/it/pagopa/pn/deliverypush/action/digitalworkflow/DigitalWorkFlowHandlerTest.java
+++ b/src/test/java/it/pagopa/pn/deliverypush/action/digitalworkflow/DigitalWorkFlowHandlerTest.java
@@ -67,8 +67,6 @@ class DigitalWorkFlowHandlerTest {
     private DigitalWorkflowFirstSendRepeatHandler digitalWorkflowFirstSendRepeatHandler;
     @Mock
     private PnDeliveryPushConfigs.ExternalChannel externalChannel;
-    
-    private SendAndUnscheduleNotification sendAndUnscheduleNotification;
 
 
     private DigitalWorkFlowHandler handler;
@@ -79,8 +77,8 @@ class DigitalWorkFlowHandlerTest {
 
 
     @BeforeEach
-    public void setup() {
-        sendAndUnscheduleNotification = new SendAndUnscheduleNotification(externalChannelService, pnDeliveryPushConfigs, schedulerService);
+    void setup() {
+        SendAndUnscheduleNotification sendAndUnscheduleNotification = new SendAndUnscheduleNotification(externalChannelService, pnDeliveryPushConfigs, schedulerService);
         FeatureEnabledUtils featureEnabledUtils = new FeatureEnabledUtils(pnDeliveryPushConfigs);
         handler = new DigitalWorkFlowHandler(sendAndUnscheduleNotification, notificationService,
                 schedulerService, digitalWorkFlowUtils, completionWorkflow, nationalRegistriesService, instantNowSupplier,
diff --git a/src/test/java/it/pagopa/pn/deliverypush/action/documentcreationresponsehandler/DocumentCreationResponseHandlerTest.java b/src/test/java/it/pagopa/pn/deliverypush/action/documentcreationresponsehandler/DocumentCreationResponseHandlerTest.java
deleted file mode 100644
index 1899442d1..000000000
--- a/src/test/java/it/pagopa/pn/deliverypush/action/documentcreationresponsehandler/DocumentCreationResponseHandlerTest.java
+++ /dev/null
@@ -1,165 +0,0 @@
-package it.pagopa.pn.deliverypush.action.documentcreationresponsehandler;
-
-class DocumentCreationResponseHandlerTest {
-//    @Mock
-//    private ReceivedLegalFactCreationResponseHandler receivedLegalFactHandler;
-//    @Mock
-//    private AarCreationResponseHandler aarCreationResponseHandler;
-//    @Mock
-//    private NotificationViewLegalFactCreationResponseHandler notificationViewLegalFactCreationResponseHandler;
-//    @Mock
-//    private DigitalDeliveryCreationResponseHandler digitalDeliveryCreationResponseHandler;
-//    @Mock
-//    private AnalogFailureDeliveryCreationResponseHandler analogFailureDeliveryCreationResponseHandler;
-//    @Mock
-//    private TimelineUtils timelineUtils;
-//
-//    private DocumentCreationResponseHandler handler;
-//
-//    @BeforeEach
-//    public void setup() {
-//        handler = new DocumentCreationResponseHandler(receivedLegalFactHandler, aarCreationResponseHandler, notificationViewLegalFactCreationResponseHandler, digitalDeliveryCreationResponseHandler, analogFailureDeliveryCreationResponseHandler, timelineUtils);
-//    }
-//
-//    @ExtendWith(SpringExtension.class)
-//    @Test
-//    void handleResponseReceivedSenderAck() {
-//        //GIVEN
-//        String iun = "testIun";
-//        Integer recIndex = null;
-//        DocumentCreationResponseActionDetails details = DocumentCreationResponseActionDetails.builder()
-//                .key("legalFactId")
-//                .documentCreationType(DocumentCreationTypeInt.SENDER_ACK)
-//                .build();
-//
-//        Mockito.when(timelineUtils.checkIsNotificationCancellationRequested(Mockito.anyString())).thenReturn(false);
-//        //WHEN
-//        handler.handleResponseReceived(iun, recIndex, details);
-//
-//        //THEN
-//        Mockito.verify(receivedLegalFactHandler).handleReceivedLegalFactCreationResponse(iun, details.getKey());
-//    }
-//
-//    @ExtendWith(SpringExtension.class)
-//    @Test
-//    void handleResponseReceivedAAR() {
-//        //GIVEN
-//        String iun = "testIun";
-//        int recIndex = 0;
-//        DocumentCreationResponseActionDetails details = DocumentCreationResponseActionDetails.builder()
-//                .key("legalFactId")
-//                .documentCreationType(DocumentCreationTypeInt.AAR)
-//                .build();
-//        Mockito.when(timelineUtils.checkIsNotificationCancellationRequested(Mockito.anyString())).thenReturn(false);
-//
-//        //WHEN
-//        handler.handleResponseReceived(iun, recIndex, details);
-//
-//        //THEN
-//        Mockito.verify(aarCreationResponseHandler).handleAarCreationResponse(iun, recIndex, details);
-//    }
-//
-//    @ExtendWith(SpringExtension.class)
-//    @Test
-//    void handleResponseReceivedDIGITAL_DELIVERY() {
-//        //GIVEN
-//        String iun = "testIun";
-//        int recIndex = 0;
-//        DocumentCreationResponseActionDetails details = DocumentCreationResponseActionDetails.builder()
-//                .key("legalFactId")
-//                .documentCreationType(DocumentCreationTypeInt.DIGITAL_DELIVERY)
-//                .build();
-//        Mockito.when(timelineUtils.checkIsNotificationCancellationRequested(Mockito.anyString())).thenReturn(false);
-//
-//        //WHEN
-//        handler.handleResponseReceived(iun, recIndex, details);
-//
-//        //THEN
-//        Mockito.verify(digitalDeliveryCreationResponseHandler).handleDigitalDeliveryCreationResponse(iun, recIndex, details);
-//    }
-//
-//
-//    @ExtendWith(SpringExtension.class)
-//    @Test
-//    void handleResponseReceivedANALOG_FAILURE_DELIVERY() {
-//        //GIVEN
-//        String iun = "testIun";
-//        Integer recIndex = 0;
-//        DocumentCreationResponseActionDetails details = DocumentCreationResponseActionDetails.builder()
-//                .key("legalFactId")
-//                .documentCreationType(DocumentCreationTypeInt.ANALOG_FAILURE_DELIVERY)
-//                .build();
-//        Mockito.when(timelineUtils.checkIsNotificationCancellationRequested(Mockito.anyString())).thenReturn(false);
-//
-//        //WHEN
-//        handler.handleResponseReceived(iun, recIndex, details);
-//
-//        //THEN
-//        Mockito.verify(analogFailureDeliveryCreationResponseHandler).handleAnalogFailureDeliveryCreationResponse(iun, recIndex, details);
-//    }
-//
-//
-//    @ExtendWith(SpringExtension.class)
-//    @Test
-//    void handleResponseReceivedRECIPIENT_ACCESS() {
-//        //GIVEN
-//        String iun = "testIun";
-//        Integer recIndex = 0;
-//        DocumentCreationResponseActionDetails details = DocumentCreationResponseActionDetails.builder()
-//                .key("legalFactId")
-//                .documentCreationType(DocumentCreationTypeInt.RECIPIENT_ACCESS)
-//                .build();
-//        Mockito.when(timelineUtils.checkIsNotificationCancellationRequested(Mockito.anyString())).thenReturn(false);
-//
-//        //WHEN
-//        handler.handleResponseReceived(iun, recIndex, details);
-//
-//        //THEN
-//        Mockito.verify(notificationViewLegalFactCreationResponseHandler).handleLegalFactCreationResponse(iun, recIndex, details);
-//    }
-//
-//    @ExtendWith(SpringExtension.class)
-//    @Test
-//    void handleResponseReceivedKo() {
-//        //GIVEN
-//        String iun = "testIun";
-//        Integer recIndex = null;
-//        DocumentCreationResponseActionDetails details = DocumentCreationResponseActionDetails.builder()
-//                .key("legalFactId")
-//                .documentCreationType(DocumentCreationTypeInt.SENDER_ACK)
-//                .build();
-//
-//
-//        doThrow(new RuntimeException("ex")).when(receivedLegalFactHandler).handleReceivedLegalFactCreationResponse(Mockito.any(), Mockito.any());
-//        Mockito.when(timelineUtils.checkIsNotificationCancellationRequested(Mockito.anyString())).thenReturn(false);
-//
-//        //WHEN
-//        Assertions.assertThrows(RuntimeException.class, () -> {
-//            handler.handleResponseReceived(iun, recIndex, details);
-//        });
-//    }
-//
-//    @ExtendWith(SpringExtension.class)
-//    @Test
-//    void handleResponseCancelled() {
-//        //GIVEN
-//        String iun = "IUN-handleResponseCancelled";
-//        int recIndex = 0;
-//        String legalFactId = "legalFactId";
-//        DocumentCreationResponseActionDetails details = DocumentCreationResponseActionDetails.builder()
-//            .key(legalFactId)
-//            .documentCreationType(DocumentCreationTypeInt.RECIPIENT_ACCESS)
-//            .build();
-//        Mockito.when(timelineUtils.checkIsNotificationCancellationRequested(Mockito.anyString())).thenReturn(true);
-//
-//        //WHEN
-//        handler.handleResponseReceived(iun, recIndex, details);
-//
-//        //THEN
-//        Mockito.verify(receivedLegalFactHandler, Mockito.never()).handleReceivedLegalFactCreationResponse(iun,legalFactId);
-//        Mockito.verify(aarCreationResponseHandler, Mockito.never()).handleAarCreationResponse(iun, recIndex, details);
-//        Mockito.verify(digitalDeliveryCreationResponseHandler, Mockito.never()).handleDigitalDeliveryCreationResponse(iun, recIndex, details);
-//        Mockito.verify(analogFailureDeliveryCreationResponseHandler, Mockito.never()).handleAnalogFailureDeliveryCreationResponse(iun, recIndex, details);
-//        Mockito.verify(notificationViewLegalFactCreationResponseHandler, Mockito.never()).handleLegalFactCreationResponse(iun, recIndex, details);
-//    }
-}
\ No newline at end of file
diff --git a/src/test/java/it/pagopa/pn/deliverypush/action/it/CommonTestConfiguration.java b/src/test/java/it/pagopa/pn/deliverypush/action/it/CommonTestConfiguration.java
index e3731d5ea..8d8e2a7b0 100644
--- a/src/test/java/it/pagopa/pn/deliverypush/action/it/CommonTestConfiguration.java
+++ b/src/test/java/it/pagopa/pn/deliverypush/action/it/CommonTestConfiguration.java
@@ -206,8 +206,6 @@ public SpringTestConfiguration() {
     @Autowired
     AddressManagerClientMock addressManagerClientMock;
     @Autowired
-    F24ClientMock f24ClientMock;
-    @Autowired
     PnDeliveryPushConfigs cfg;
     
     @BeforeEach
@@ -234,7 +232,6 @@ public void setup() {
                 pnDataVaultClientReactiveMock,
                 documentCreationRequestDaoMock,
                 addressManagerClientMock,
-                f24ClientMock,
                 actionPoolMock
         );
     }
diff --git a/src/test/java/it/pagopa/pn/deliverypush/action/it/mockbean/AbstractCachedSsmParameterConsumerMock.java b/src/test/java/it/pagopa/pn/deliverypush/action/it/mockbean/AbstractCachedSsmParameterConsumerMock.java
index 6513b1859..e5d61f8d1 100644
--- a/src/test/java/it/pagopa/pn/deliverypush/action/it/mockbean/AbstractCachedSsmParameterConsumerMock.java
+++ b/src/test/java/it/pagopa/pn/deliverypush/action/it/mockbean/AbstractCachedSsmParameterConsumerMock.java
@@ -10,18 +10,18 @@
 
 public class AbstractCachedSsmParameterConsumerMock implements ParameterConsumer {
     private static final String RADD_EXPERIMENTATION_NAME = "radd-experimentation";
-    private static final String jsonRADDExperimentationParameterConsumer = "[\"80078\", \"80124\"]";
+    private static final String JSON_RADD_EXPERIMENTATION_PARAMETER_CONSUMER = "[\"80078\", \"80124\"]";
 
     @Override
     public <T> Optional<T> getParameterValue(String storeName, Class<T> aClass) {
         Optional<T> result = Optional.empty();
 
         if(storeName.startsWith(RADD_EXPERIMENTATION_NAME) &&
-                StringUtils.hasText(jsonRADDExperimentationParameterConsumer)){
+                StringUtils.hasText(JSON_RADD_EXPERIMENTATION_PARAMETER_CONSUMER)){
             ObjectMapper objectMapper = new ObjectMapper();
 
             try {
-                result = Optional.of(objectMapper.readValue(jsonRADDExperimentationParameterConsumer, aClass));
+                result = Optional.of(objectMapper.readValue(JSON_RADD_EXPERIMENTATION_PARAMETER_CONSUMER, aClass));
             } catch (JsonProcessingException var7) {
                 throw new PnInternalException("[TEST] Unable to deserialize object", "PN_GENERIC_ERROR", var7);
             }
diff --git a/src/test/java/it/pagopa/pn/deliverypush/action/it/mockbean/F24ClientMock.java b/src/test/java/it/pagopa/pn/deliverypush/action/it/mockbean/F24ClientMock.java
index c3b7826d7..6dc1a205e 100644
--- a/src/test/java/it/pagopa/pn/deliverypush/action/it/mockbean/F24ClientMock.java
+++ b/src/test/java/it/pagopa/pn/deliverypush/action/it/mockbean/F24ClientMock.java
@@ -106,13 +106,13 @@ private PnF24MetadataValidationEndEventPayload buildMetadataValidationEndWithErr
                                 PnF24MetadataValidationIssue.builder()
                                         .code("ERROR_TEST")
                                         .detail("ERROR_DETAIL")
-                                        .element("rec0paym0")
+                                        .element("rec0pay0")
                                         .build(),
 
                                 PnF24MetadataValidationIssue.builder()
                                         .code("ERROR_TEST")
                                         .detail("ERROR_DETAIL_2")
-                                        .element("rec0paym1")
+                                        .element("rec0pay1")
                                         .build()))
                 .build();
     }
@@ -120,7 +120,4 @@ private PnF24MetadataValidationEndEventPayload buildMetadataValidationEndWithErr
     private PnF24MetadataValidationEndEventPayload buildMetadataValidationEndOk(String setId) {
         return PnF24MetadataValidationEndEventPayload.builder().setId(setId).status("OK").build();
     }
-
-    public void clear() {
-    }
 }
diff --git a/src/test/java/it/pagopa/pn/deliverypush/action/it/mockbean/TimelineCounterDaoMock.java b/src/test/java/it/pagopa/pn/deliverypush/action/it/mockbean/TimelineCounterDaoMock.java
index b1f303456..36d704fb3 100644
--- a/src/test/java/it/pagopa/pn/deliverypush/action/it/mockbean/TimelineCounterDaoMock.java
+++ b/src/test/java/it/pagopa/pn/deliverypush/action/it/mockbean/TimelineCounterDaoMock.java
@@ -9,11 +9,7 @@
 @Slf4j
 public class TimelineCounterDaoMock implements TimelineCounterEntityDao {
 
-    final HashMap<String, Long> counter = new HashMap<String, Long>();
-
-    public TimelineCounterDaoMock() {
-
-    }
+    final HashMap<String, Long> counter = new HashMap<>();
 
     public void clear() {
         this.counter.clear();
diff --git a/src/test/java/it/pagopa/pn/deliverypush/action/it/utils/TestUtils.java b/src/test/java/it/pagopa/pn/deliverypush/action/it/utils/TestUtils.java
index d6272d203..23b308c4c 100644
--- a/src/test/java/it/pagopa/pn/deliverypush/action/it/utils/TestUtils.java
+++ b/src/test/java/it/pagopa/pn/deliverypush/action/it/utils/TestUtils.java
@@ -1192,7 +1192,6 @@ public static void initializeAllMockClient(SafeStorageClientMock safeStorageClie
                                                PnDataVaultClientReactiveMock pnDataVaultClientReactiveMock,
                                                DocumentCreationRequestDaoMock documentCreationRequestDaoMock,
                                                AddressManagerClientMock addressManagerClientMock,
-                                               F24ClientMock f24ClientMock,
                                                ActionPoolMock actionPoolMock
     ) {
 
@@ -1210,7 +1209,6 @@ public static void initializeAllMockClient(SafeStorageClientMock safeStorageClie
         pnDataVaultClientReactiveMock.clear();
         documentCreationRequestDaoMock.clear();
         addressManagerClientMock.clear();
-        f24ClientMock.clear();
         actionPoolMock.clear();
         
         ConsoleAppenderCustom.initializeLog();
diff --git a/src/test/java/it/pagopa/pn/deliverypush/middleware/queue/producer/abstractions/actionspool/impl/ActionEventTypeTest.java b/src/test/java/it/pagopa/pn/deliverypush/middleware/queue/producer/abstractions/actionspool/impl/ActionEventTypeTest.java
deleted file mode 100644
index 9223e1634..000000000
--- a/src/test/java/it/pagopa/pn/deliverypush/middleware/queue/producer/abstractions/actionspool/impl/ActionEventTypeTest.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package it.pagopa.pn.deliverypush.middleware.queue.producer.abstractions.actionspool.impl;
-
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-class ActionEventTypeTest {
-
-
-    @Test
-    void getEventJavaClass() {
-        ActionEventType actionGeneric = ActionEventType.ACTION_GENERIC;
-        Class<?> action = actionGeneric.getEventJavaClass();
-        Assertions.assertNotNull(action);
-    }
-}
\ No newline at end of file
diff --git a/src/test/java/it/pagopa/pn/deliverypush/rest/PnNotificationViewControllerTest.java b/src/test/java/it/pagopa/pn/deliverypush/rest/PnNotificationViewControllerTest.java
index 1535e19c1..1a855c9ed 100644
--- a/src/test/java/it/pagopa/pn/deliverypush/rest/PnNotificationViewControllerTest.java
+++ b/src/test/java/it/pagopa/pn/deliverypush/rest/PnNotificationViewControllerTest.java
@@ -22,7 +22,7 @@
 @WebFluxTest(PnNotificationViewController.class)
 class PnNotificationViewControllerTest {
 
-    private static final String FakeIUN = "fake_iun";
+    private static final String FAKE_IUN = "fake_iun";
 
     @MockBean
     private NotificationService notificationService;
@@ -46,10 +46,10 @@ void notifyNotificationViewedNoNotification() {
                 .recipientType(RecipientType.PF)
                 .build();
         // WHEN
-        Mockito.when(notificationService.getNotificationByIun(Mockito.anyString())).thenThrow(new PnHttpResponseException(FakeIUN, 404));
+        Mockito.when(notificationService.getNotificationByIun(Mockito.anyString())).thenThrow(new PnHttpResponseException(FAKE_IUN, 404));
 
         webTestClient.post()
-                .uri("/delivery-push-private/" + FakeIUN + "/viewed")
+                .uri("/delivery-push-private/" + FAKE_IUN + "/viewed")
                 .accept(MediaType.ALL)
                 .header(HttpHeaders.ACCEPT, "application/json")
                 .body(Mono.just(request), RequestNotificationViewedDto.class)
@@ -64,7 +64,7 @@ void notifyNotificationViewedNoNotification() {
     void notifyNotificationViewedOk() {
         // GIVEN
         NotificationInt notification = NotificationTestBuilder.builder()
-                .withIun(FakeIUN)
+                .withIun(FAKE_IUN)
                 .build();
         RequestNotificationViewedDto request = RequestNotificationViewedDto.builder()
                 .recipientInternalId("recipientInternalId")
@@ -79,7 +79,7 @@ void notifyNotificationViewedOk() {
                 .thenReturn(Mono.empty());
 
         webTestClient.post()
-                .uri("/delivery-push-private/" + FakeIUN + "/viewed")
+                .uri("/delivery-push-private/" + FAKE_IUN + "/viewed")
                 .accept(MediaType.ALL)
                 .header(HttpHeaders.ACCEPT, "application/json")
                 .body(Mono.just(request), RequestNotificationViewedDto.class)
@@ -87,7 +87,7 @@ void notifyNotificationViewedOk() {
                 .expectStatus()
                 .isOk()
                 .expectBody(ResponseNotificationViewedDto.class)
-                .isEqualTo(ResponseNotificationViewedDto.builder().iun(FakeIUN).build());
+                .isEqualTo(ResponseNotificationViewedDto.builder().iun(FAKE_IUN).build());
 
         // THEN
         Mockito.verify(notificationService).getNotificationByIun(Mockito.anyString());
@@ -108,7 +108,7 @@ void notifyNotificationRaddRetrievedOk() {
                 .thenReturn(Mono.empty());
 
         webTestClient.post()
-                .uri("/delivery-push-private/" + FakeIUN + "/raddretrieved")
+                .uri("/delivery-push-private/" + FAKE_IUN + "/raddretrieved")
                 .accept(MediaType.ALL)
                 .header(HttpHeaders.ACCEPT, "application/json")
                 .body(Mono.just(request), RequestNotificationViewedDto.class)
@@ -116,7 +116,7 @@ void notifyNotificationRaddRetrievedOk() {
                 .expectStatus()
                 .isOk()
                 .expectBody(ResponseNotificationViewedDto.class)
-                .isEqualTo(ResponseNotificationViewedDto.builder().iun(FakeIUN).build());
+                .isEqualTo(ResponseNotificationViewedDto.builder().iun(FAKE_IUN).build());
 
         // THEN
         Mockito.verify(notificationViewedRequestHandler).handleNotificationRaddRetrieved(Mockito.any(), Mockito.any());


Reviews:
user: login: abertu75
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-12T09:46:20Z
user: login: simonerondinella
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-12T09:58:41Z
user: login: empassaro
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-12T10:49:21Z
user: login: empassaro
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-12T10:51:51Z
user: login: empassaro
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-12T10:55:35Z
user: login: simonerondinella
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-12T13:10:26Z

Review comments:
diff_hunk: @@ -974,8 +974,8 @@ Resources:
         #ContainerEnvEntry4: !Sub 'PN_DELIVERYPUSH_WEBAPP_DIRECTACCESSURLTEMPLATELEGAL=${LegalPersonPortalUrl}'
         ContainerEnvEntry5: !Sub 'PN_DELIVERYPUSH_PAPERCHANNELBASEURL=http://${ApplicationLoadBalancerDomain}:8080'
         ContainerEnvEntry6: !Sub 'PN_DELIVERYPUSH_TOPICS_FROMEXTERNALCHANNEL=${ExternalChannelsOutputsQueueName}'
-        ContainerEnvEntry7: !Sub 'PN_DELIVERYPUSH_TOPICS_SCHEDULEDACTIONS=${ScheduledActionsQueueName}'
-        ContainerEnvEntry8: !Sub 'PN_DELIVERYPUSH_TOPICS_EXECUTEDACTIONS=${DoneActionsQueueName}'
+        ContainerEnvEntry7: !Sub 'PN_DELIVERYPUSH_TOPICS_SCHEDULEDACTIONS=${ScheduledActionsQueueName}' #DA COMMENTARE DOPO RIMOZIONE WEBHOOK
+        #ContainerEnvEntry8: !Sub 'PN_DELIVERYPUSH_TOPICS_EXECUTEDACTIONS=${DoneActionsQueueName}'
path: scripts/aws/cfn/microservice.yml
user: login: simonerondinella
body: vedo quella prcedente è condizionata alla rimozione webhook, questa invece no?
created_at: 2025-05-12T09:54:14Z
author_association: CONTRIBUTOR
diff_hunk: @@ -281,7 +281,7 @@ private void checkDocumentsMaxPageNumber(NotificationInt notification, int maxPa
                             safeStorageService.getFile(ref.getKey(), false)
                                     .onErrorResume(PnFileNotFoundException.class, this::handleNotFoundError))
                     .block();
-            byte[] pieceOfContent = safeStorageService.downloadPieceOfContent(fd.getKey(), fd.getDownload().getUrl(), -1).block();
+            byte[] pieceOfContent = safeStorageService.downloadPieceOfContent(Objects.requireNonNull(fd).getKey(), fd.getDownload().getUrl(), -1).block();
path: src/main/java/it/pagopa/pn/deliverypush/action/startworkflow/notificationvalidation/NotificationValidationActionHandler.java
user: login: simonerondinella
body: questa vorrei capirla meglio, cosa accade se l'oggetto è null? Potrebbe avere senso essere più espliciti e mettere un if che copre tutto con il controllo in questione?
created_at: 2025-05-12T09:55:08Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1,18 +1,6 @@
 package it.pagopa.pn.deliverypush.middleware.queue.producer.abstractions.actionspool.impl;
 
-import it.pagopa.pn.api.dto.events.IEventType;
-
-public enum ActionEventType implements IEventType {
-    ACTION_GENERIC( ActionEvent.class );
-
-    private final Class<?> eventClass;
-
-    ActionEventType( Class<?> eventClass) {
-        this.eventClass = eventClass;
-    }
-
-    public Class<?> getEventJavaClass() {
-        return eventClass;
-    }
 
+public enum ActionEventType {
path: src/main/java/it/pagopa/pn/deliverypush/middleware/queue/producer/abstractions/actionspool/impl/ActionEventType.java
user: login: simonerondinella
body: Questa modifica è relativa sempre a una issue sonar?
created_at: 2025-05-12T09:56:13Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1,18 +1,6 @@
 package it.pagopa.pn.deliverypush.middleware.queue.producer.abstractions.actionspool.impl;
 
-import it.pagopa.pn.api.dto.events.IEventType;
-
-public enum ActionEventType implements IEventType {
-    ACTION_GENERIC( ActionEvent.class );
-
-    private final Class<?> eventClass;
-
-    ActionEventType( Class<?> eventClass) {
-        this.eventClass = eventClass;
-    }
-
-    public Class<?> getEventJavaClass() {
-        return eventClass;
-    }
 
+public enum ActionEventType {
path: src/main/java/it/pagopa/pn/deliverypush/middleware/queue/producer/abstractions/actionspool/impl/ActionEventType.java
user: login: empassaro
body: No, questa rientrava nell'ambito della rimozione dei producer di actions, per permettere di eliminare la classe ActionEvent (che però avevo dimenticato di rimuovere, ora la pusho).
created_at: 2025-05-12T10:49:20Z
author_association: COLLABORATOR
diff_hunk: @@ -974,8 +974,8 @@ Resources:
         #ContainerEnvEntry4: !Sub 'PN_DELIVERYPUSH_WEBAPP_DIRECTACCESSURLTEMPLATELEGAL=${LegalPersonPortalUrl}'
         ContainerEnvEntry5: !Sub 'PN_DELIVERYPUSH_PAPERCHANNELBASEURL=http://${ApplicationLoadBalancerDomain}:8080'
         ContainerEnvEntry6: !Sub 'PN_DELIVERYPUSH_TOPICS_FROMEXTERNALCHANNEL=${ExternalChannelsOutputsQueueName}'
-        ContainerEnvEntry7: !Sub 'PN_DELIVERYPUSH_TOPICS_SCHEDULEDACTIONS=${ScheduledActionsQueueName}'
-        ContainerEnvEntry8: !Sub 'PN_DELIVERYPUSH_TOPICS_EXECUTEDACTIONS=${DoneActionsQueueName}'
+        ContainerEnvEntry7: !Sub 'PN_DELIVERYPUSH_TOPICS_SCHEDULEDACTIONS=${ScheduledActionsQueueName}' #DA COMMENTARE DOPO RIMOZIONE WEBHOOK
+        #ContainerEnvEntry8: !Sub 'PN_DELIVERYPUSH_TOPICS_EXECUTEDACTIONS=${DoneActionsQueueName}'
path: scripts/aws/cfn/microservice.yml
user: login: empassaro
body: Se intendi la PN_DELIVERYPUSH_TOPICS_EXECUTEDACTIONS, l'ho potuta già rimuovere poichè era richiamata solo nel producer Sqs delle actions. Dunque dopo l'eliminazione di quel pezzo non c'erano più riferimenti a quella configurazione.
created_at: 2025-05-12T10:51:51Z
author_association: COLLABORATOR
diff_hunk: @@ -281,7 +281,7 @@ private void checkDocumentsMaxPageNumber(NotificationInt notification, int maxPa
                             safeStorageService.getFile(ref.getKey(), false)
                                     .onErrorResume(PnFileNotFoundException.class, this::handleNotFoundError))
                     .block();
-            byte[] pieceOfContent = safeStorageService.downloadPieceOfContent(fd.getKey(), fd.getDownload().getUrl(), -1).block();
+            byte[] pieceOfContent = safeStorageService.downloadPieceOfContent(Objects.requireNonNull(fd).getKey(), fd.getDownload().getUrl(), -1).block();
path: src/main/java/it/pagopa/pn/deliverypush/action/startworkflow/notificationvalidation/NotificationValidationActionHandler.java
user: login: empassaro
body: Qui abbiamo implementato il suggerimento di intellij più "compatto" per risolvere la segnalazione. Analizzando un po' il contesto direi che quell'oggetto non dovrebbe essere mai null poichè viene restituito da una chiamata (getFile per filekey) a safe storage. Per quello che so io non mi sembra possibile avere in risposta un oggetto vuoto, al limite avremmo un'eccezione per file non trovato.
created_at: 2025-05-12T10:55:35Z
author_association: COLLABORATOR

PR comments:
user: login: sonarqubecloud[bot]
created_at: 2025-05-12T13:49:21Z
body: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=pagopa_pn-delivery-push&pullRequest=1273) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=pagopa_pn-delivery-push&pullRequest=1273&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=pagopa_pn-delivery-push&pullRequest=1273&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=pagopa_pn-delivery-push&pullRequest=1273&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=pagopa_pn-delivery-push&pullRequest=1273&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=pagopa_pn-delivery-push&pullRequest=1273&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=pagopa_pn-delivery-push&pullRequest=1273)


author_association: NONE