Skip to content

Commit 24d671a

Browse files
removing unnecessary restricted characters check
1 parent 95329f0 commit 24d671a

2 files changed

Lines changed: 0 additions & 17 deletions

File tree

sdm/src/main/java/com/sap/cds/sdm/handler/applicationservice/SDMCreateAttachmentsHandler.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ public void processBefore(CdsCreateEventContext context, List<CdsData> data) thr
6363
context.getTarget().getQualifiedName(),
6464
entityData);
6565
logger.info("Attachment compositions present in CDS Model : " + attachmentCompositionDetails);
66-
6766
updateName(context, data, attachmentCompositionDetails);
6867
}
6968
}
@@ -222,14 +221,6 @@ private void processAttachment(
222221
dbQuery.getPropertiesForID(
223222
attachmentEntity.get(), persistenceService, id, secondaryTypeProperties);
224223

225-
// Check for restricted characters early and return
226-
if (SDMUtils.hasRestrictedCharactersInName(filenameInRequest)) {
227-
fileNameWithRestrictedCharacters.add(filenameInRequest);
228-
AttachmentsHandlerUtils.revertAttachmentProperties(
229-
attachment, fileNameInSDM, propertiesInDB, secondaryTypeProperties, descriptionInSDM);
230-
return;
231-
}
232-
233224
// Prepare document and updated properties
234225
Map<String, String> updatedSecondaryProperties =
235226
SDMUtils.getUpdatedSecondaryProperties(

sdm/src/main/java/com/sap/cds/sdm/handler/applicationservice/SDMUpdateAttachmentsHandler.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -240,14 +240,6 @@ public void processAttachment(
240240
descriptionInDB = propertiesInDB.get("note");
241241
}
242242

243-
// Check for restricted characters early and return
244-
if (Boolean.TRUE.equals(SDMUtils.hasRestrictedCharactersInName(filenameInRequest))) {
245-
fileNameWithRestrictedCharacters.add(filenameInRequest);
246-
AttachmentsHandlerUtils.revertAttachmentProperties(
247-
attachment, fileNameInDB, propertiesInDB, secondaryTypeProperties, descriptionInDB);
248-
return;
249-
}
250-
251243
// Prepare document and updated properties
252244
Map<String, String> updatedSecondaryProperties =
253245
SDMUtils.getUpdatedSecondaryProperties(

0 commit comments

Comments
 (0)