diff --git a/cds-feature-attachments/src/main/java/com/sap/cds/feature/attachments/handler/applicationservice/helper/ModifyApplicationHandlerHelper.java b/cds-feature-attachments/src/main/java/com/sap/cds/feature/attachments/handler/applicationservice/helper/ModifyApplicationHandlerHelper.java index c814ba01..704e2f59 100644 --- a/cds-feature-attachments/src/main/java/com/sap/cds/feature/attachments/handler/applicationservice/helper/ModifyApplicationHandlerHelper.java +++ b/cds-feature-attachments/src/main/java/com/sap/cds/feature/attachments/handler/applicationservice/helper/ModifyApplicationHandlerHelper.java @@ -45,11 +45,10 @@ public static InputStream handleAttachmentForEntity(List existingDataLi var keys = ApplicationHandlerHelper.removeDraftKeys(path.target().keys()); ReadonlyDataContextEnhancer.fillReadonlyInContext((CdsData) path.target().values()); var existingData = getExistingData(keys, existingDataList); - var contentIdExists = path.target().values().containsKey(Attachments.CONTENT_ID); var contentId = (String) path.target().values().get(Attachments.CONTENT_ID); // for the current request find the event to process - ModifyAttachmentEvent eventToProcess = eventFactory.getEvent(content, contentId, contentIdExists, existingData); + ModifyAttachmentEvent eventToProcess = eventFactory.getEvent(content, contentId, existingData); // process the event return eventToProcess.processEvent(path, content, existingData, eventContext); diff --git a/cds-feature-attachments/src/main/java/com/sap/cds/feature/attachments/handler/applicationservice/processor/modifyevents/DefaultModifyAttachmentEventFactory.java b/cds-feature-attachments/src/main/java/com/sap/cds/feature/attachments/handler/applicationservice/processor/modifyevents/DefaultModifyAttachmentEventFactory.java index e2f38ea8..aa4d9cc4 100644 --- a/cds-feature-attachments/src/main/java/com/sap/cds/feature/attachments/handler/applicationservice/processor/modifyevents/DefaultModifyAttachmentEventFactory.java +++ b/cds-feature-attachments/src/main/java/com/sap/cds/feature/attachments/handler/applicationservice/processor/modifyevents/DefaultModifyAttachmentEventFactory.java @@ -12,10 +12,9 @@ import com.sap.cds.feature.attachments.service.AttachmentService; /** - * The class {@link DefaultModifyAttachmentEventFactory} is a factory class - * that creates the corresponding event for the attachment service {@link AttachmentService}. - * The class is used to determine the event that should be executed based on the content, - * the contentId and the existingData.
+ * The class {@link DefaultModifyAttachmentEventFactory} is a factory class that creates the corresponding event for the + * attachment service {@link AttachmentService}. The class is used to determine the event that should be executed based + * on the content, the contentId and the existingData.
* The events could be: *