mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-20 00:04:27 +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.
|
* @throws BuildException if the task was not configured correctly.
|
||||||
*/
|
*/
|
||||||
private void validateConfiguration() throws BuildException {
|
private synchronized void validateConfiguration() throws BuildException {
|
||||||
if (path == null) {
|
if (path == null) {
|
||||||
throw new BuildException("No project dependencies have been defined to analyze.");
|
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
|
* @return whether or not the index is open
|
||||||
*/
|
*/
|
||||||
public boolean isOpen() {
|
public synchronized boolean isOpen() {
|
||||||
return openState;
|
return openState;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -274,7 +274,7 @@ public final class CpeMemoryIndex {
|
|||||||
* @return the Document
|
* @return the Document
|
||||||
* @throws IOException thrown if there is an IOException
|
* @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);
|
return indexSearcher.doc(documentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,7 +283,7 @@ public final class CpeMemoryIndex {
|
|||||||
*
|
*
|
||||||
* @return the number of CPE entries stored in the index
|
* @return the number of CPE entries stored in the index
|
||||||
*/
|
*/
|
||||||
public int numDocs() {
|
public synchronized int numDocs() {
|
||||||
if (indexReader == null) {
|
if (indexReader == null) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user