From 1a998f4cdc7946a8f2f26673df4826d83a5de56a Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com.> Date: Fri, 20 Jun 2025 10:43:43 +0100 Subject: [PATCH] remove --- .../java/stirling/software/common/aop/AutoJobAspect.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/common/src/main/java/stirling/software/common/aop/AutoJobAspect.java b/common/src/main/java/stirling/software/common/aop/AutoJobAspect.java index dafb7b3f4..51c1882b6 100644 --- a/common/src/main/java/stirling/software/common/aop/AutoJobAspect.java +++ b/common/src/main/java/stirling/software/common/aop/AutoJobAspect.java @@ -8,7 +8,6 @@ import java.util.concurrent.atomic.AtomicReference; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.*; -import org.springframework.beans.BeanUtils; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; import org.springframework.web.multipart.MultipartFile; @@ -251,11 +250,10 @@ public class AutoJobAspect { if (arg instanceof PDFFile pdfFile) { // Create a copy of PDFFile to avoid mutating the original + // Using direct property access instead of reflection for better performance PDFFile pdfFileCopy = new PDFFile(); - - // Use Spring's BeanUtils to copy all properties, avoiding missed fields if PDFFile - // grows - BeanUtils.copyProperties(pdfFile, pdfFileCopy); + pdfFileCopy.setFileId(pdfFile.getFileId()); + pdfFileCopy.setFileInput(pdfFile.getFileInput()); // Case 1: fileId is provided but no fileInput if (pdfFileCopy.getFileInput() == null && pdfFileCopy.getFileId() != null) {