MNT-24883 avoid GodClass error in PMD

This commit is contained in:
bsayan2 2025-05-26 12:28:50 +05:30
parent ba24d8d700
commit 72db7e48c8

View File

@ -225,21 +225,7 @@ public class TransformManagerImpl implements TransformManager
{
logger.error("Failed to delete temporary source file {}", sourceFile.getPath());
}
deleteDocUUIDFolder();
outputStreamLengthRecorder = null;
sourceFile = null;
sourceFileName = null;
createSourceFileCalled = false;
startedWithSourceFile = null;
}
public void deleteDocUUIDFolder()
{
if (sourceFile == null)
{
return;
}
if (Util.isDocFile(sourceFile.getPath()))
if (sourceFile != null && Util.isDocFile(sourceFile.getPath()))
{
File parentDir = sourceFile.getParentFile();
if (parentDir != null
@ -249,6 +235,11 @@ public class TransformManagerImpl implements TransformManager
logger.error("Failed to delete parent directory {}", parentDir.getPath());
}
}
outputStreamLengthRecorder = null;
sourceFile = null;
sourceFileName = null;
createSourceFileCalled = false;
startedWithSourceFile = null;
}
public void deleteTargetFile()