mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-24 10:01:35 +01:00
Merge pull request #921 from stefanneuhaus/fix-typo-and-make-public-method-private
Fix typo: Engine.isDataBseRequired()
This commit is contained in:
@@ -129,7 +129,7 @@ public class Engine implements FileFilter, AutoCloseable {
|
|||||||
*
|
*
|
||||||
* @return whether or not the database is required
|
* @return whether or not the database is required
|
||||||
*/
|
*/
|
||||||
public boolean isDatabseRequired() {
|
private boolean isDatabaseRequired() {
|
||||||
return databaseRequired;
|
return databaseRequired;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,7 +255,7 @@ public class Engine implements FileFilter, AutoCloseable {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
if (mode.isDatabseRequired()) {
|
if (mode.isDatabaseRequired()) {
|
||||||
if (database != null) {
|
if (database != null) {
|
||||||
database.close();
|
database.close();
|
||||||
database = null;
|
database = null;
|
||||||
@@ -698,7 +698,7 @@ public class Engine implements FileFilter, AutoCloseable {
|
|||||||
* @throws ExceptionCollection thrown if fatal exceptions occur
|
* @throws ExceptionCollection thrown if fatal exceptions occur
|
||||||
*/
|
*/
|
||||||
private void initializeAndUpdateDatabase(final List<Throwable> exceptions) throws ExceptionCollection {
|
private void initializeAndUpdateDatabase(final List<Throwable> exceptions) throws ExceptionCollection {
|
||||||
if (!mode.isDatabseRequired()) {
|
if (!mode.isDatabaseRequired()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
boolean autoUpdate = true;
|
boolean autoUpdate = true;
|
||||||
@@ -866,7 +866,7 @@ public class Engine implements FileFilter, AutoCloseable {
|
|||||||
* @throws UpdateException thrown if the operation fails
|
* @throws UpdateException thrown if the operation fails
|
||||||
*/
|
*/
|
||||||
public void doUpdates(boolean remainOpen) throws UpdateException {
|
public void doUpdates(boolean remainOpen) throws UpdateException {
|
||||||
if (mode.isDatabseRequired()) {
|
if (mode.isDatabaseRequired()) {
|
||||||
H2DBLock dblock = null;
|
H2DBLock dblock = null;
|
||||||
try {
|
try {
|
||||||
if (ConnectionFactory.isH2Connection(settings)) {
|
if (ConnectionFactory.isH2Connection(settings)) {
|
||||||
@@ -927,7 +927,7 @@ public class Engine implements FileFilter, AutoCloseable {
|
|||||||
* opening the database
|
* opening the database
|
||||||
*/
|
*/
|
||||||
public void openDatabase(boolean readOnly, boolean lockRequired) {
|
public void openDatabase(boolean readOnly, boolean lockRequired) {
|
||||||
if (mode.isDatabseRequired() && database == null) {
|
if (mode.isDatabaseRequired() && database == null) {
|
||||||
//needed to update schema any required schema changes
|
//needed to update schema any required schema changes
|
||||||
database = new CveDB(settings);
|
database = new CveDB(settings);
|
||||||
if (readOnly
|
if (readOnly
|
||||||
@@ -1045,7 +1045,7 @@ public class Engine implements FileFilter, AutoCloseable {
|
|||||||
* @throws NoDataException thrown if no data exists in the CPE Index
|
* @throws NoDataException thrown if no data exists in the CPE Index
|
||||||
*/
|
*/
|
||||||
private void ensureDataExists() throws NoDataException {
|
private void ensureDataExists() throws NoDataException {
|
||||||
if (mode.isDatabseRequired() && (database == null || !database.dataExists())) {
|
if (mode.isDatabaseRequired() && (database == null || !database.dataExists())) {
|
||||||
throw new NoDataException("No documents exist");
|
throw new NoDataException("No documents exist");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user