Skip to content

Commit d2f9d87

Browse files
committed
pushed thread safety issues in logging to the logger
1 parent 645b636 commit d2f9d87

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

framework/codemodder-base/src/main/java/io/codemodder/DefaultCodemodExecutor.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,16 +155,17 @@ public CodeTFResult execute(final List<Path> filePaths) {
155155

156156
} catch (Exception e) {
157157
unscannableFiles.add(filePath);
158-
e.printStackTrace();
158+
log.error("Problem scanning file", e);
159159
}
160160
});
161161
}
162162

163163
executor.shutdown();
164164
try {
165-
boolean success = executor.awaitTermination(15, TimeUnit.MINUTES);
165+
boolean success = executor.awaitTermination(5, TimeUnit.MINUTES);
166166
log.trace("Success running codemod: {}", success);
167167
while (!executor.isTerminated()) {
168+
executor.shutdownNow();
168169
final Future<String> future = service.poll();
169170
if (future != null) {
170171
log.trace("Finished: {}", future.get());

0 commit comments

Comments
 (0)