Skip to content

Commit 67e3bef

Browse files
author
Nurgul Amat
committed
Refactor: Avoid using intermediate assignment to fix 'Assignment Branch Condition too high' issue introduced in codebeat
1 parent 61ef20f commit 67e3bef

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/pl/damianszczepanik/jenkins/buildhistorymanager/model/actions/DeleteArtifactsMatchingPatternsAction.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,7 @@ public void deleteFileAtPath(VirtualFile vRoot, String path) throws IOException,
164164
VirtualFile virtualFile = vRoot.child(path);
165165
File file = new File(virtualFile.toURI().getPath());
166166
FilePath filePath = new FilePath(file);
167-
File archiveRootFile = new File(vRoot.toURI());
168-
Delete deleteInstance = new Delete(archiveRootFile);
167+
Delete deleteInstance = new Delete(new File(vRoot.toURI()));
169168
filePath.act(deleteInstance);
170169
}
171170
}

0 commit comments

Comments
 (0)