mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 15:53:36 +01:00
coverity suggested changes
This commit is contained in:
@@ -1014,7 +1014,7 @@ public class Check extends Update {
|
||||
*
|
||||
* @throws BuildException if the task was not configured correctly.
|
||||
*/
|
||||
private void validateConfiguration() throws BuildException {
|
||||
private synchronized void validateConfiguration() throws BuildException {
|
||||
if (path == null) {
|
||||
throw new BuildException("No project dependencies have been defined to analyze.");
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ public final class CpeMemoryIndex {
|
||||
*
|
||||
* @return whether or not the index is open
|
||||
*/
|
||||
public boolean isOpen() {
|
||||
public synchronized boolean isOpen() {
|
||||
return openState;
|
||||
}
|
||||
|
||||
@@ -274,7 +274,7 @@ public final class CpeMemoryIndex {
|
||||
* @return the Document
|
||||
* @throws IOException thrown if there is an IOException
|
||||
*/
|
||||
public Document getDocument(int documentId) throws IOException {
|
||||
public synchronized Document getDocument(int documentId) throws IOException {
|
||||
return indexSearcher.doc(documentId);
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ public final class CpeMemoryIndex {
|
||||
*
|
||||
* @return the number of CPE entries stored in the index
|
||||
*/
|
||||
public int numDocs() {
|
||||
public synchronized int numDocs() {
|
||||
if (indexReader == null) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user