From 8db61a4d1eb9fc9118789085c363004805a53872 Mon Sep 17 00:00:00 2001 From: Jeremy Long Date: Sat, 10 Dec 2016 16:42:32 -0500 Subject: [PATCH] coverity suggested change --- .../src/main/java/org/owasp/dependencycheck/Engine.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dependency-check-core/src/main/java/org/owasp/dependencycheck/Engine.java b/dependency-check-core/src/main/java/org/owasp/dependencycheck/Engine.java index 240bdd7ca..7f836538d 100644 --- a/dependency-check-core/src/main/java/org/owasp/dependencycheck/Engine.java +++ b/dependency-check-core/src/main/java/org/owasp/dependencycheck/Engine.java @@ -163,15 +163,16 @@ public class Engine implements FileFilter { /** * Get the dependencies identified. The returned list is a reference to the - * engine's synchronized list. You must synchronize on it, when you modify - * and iterate over it from multiple threads. E.g. this holds for analyzers - * supporting parallel processing during their analysis phase. + * engine's synchronized list. You must synchronize on the returned + * list when you modify and iterate over it from multiple threads. E.g. + * this holds for analyzers supporting parallel processing during their + * analysis phase. * * @return the dependencies identified * @see Collections#synchronizedList(List) * @see Analyzer#supportsParallelProcessing() */ - public List getDependencies() { + public synchronized List getDependencies() { return dependencies; }