Skip to content

Commit

Permalink
use containsKey instead of null
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodOwl authored Dec 11, 2024
1 parent c8c0269 commit cfdacfd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -446,9 +446,9 @@ private void resolveAbsolutePaths(final Node rootNode, final FilePath workspace,
log.logInfo("Making paths of " + pathMapping.size() + " source code files relative to workspace root...");
var builder = new TreeStringBuilder();
rootNode.getAllFileNodes().forEach(file -> {
String newPath = pathMapping.get(file.getRelativePath());
if (newPath != null) {
file.setRelativePath(builder.intern(newPath));
String relativePath = file.getRelativePath();
if (pathMapping.containsKey(relativePath)) {
file.setRelativePath(builder.intern(pathMapping.get(relativePath)));
}
});

Expand Down

0 comments on commit cfdacfd

Please sign in to comment.