diff --git a/pom.xml b/pom.xml
index 67e629b..0ac92d7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,9 +39,10 @@
UTF-8
- 2.20.0
- 4.13.1
- 4.1
+ 2.22.0
+ 4.13.2
+ 4.4
+ 1.11.0
1.2.11
3.0.8
2.1.8
@@ -51,24 +52,21 @@
1.13.0
5.0.41
7.0.2
- 2.8.9
- 4.6.3
+ 2.10.1
+ 4.7.5
1.0.392
- 3.41.2.2
+ 3.44.1.0
2.12.2
+
+
+ 1.4.13
+ 2.16.0
+ 5.2.5
0.0.1-SNAPSHOT
0.0.1-SNAPSHOT
0.0.1-SNAPSHOT
-
-
- 1.10.0
-
-
- 1.2.11
- 2.13.3
- 5.2.2
diff --git a/src/main/java/de/mpc/pia/intermediate/compiler/parser/InputFileParserFactory.java b/src/main/java/de/mpc/pia/intermediate/compiler/parser/InputFileParserFactory.java
index c0118f1..4d81d27 100755
--- a/src/main/java/de/mpc/pia/intermediate/compiler/parser/InputFileParserFactory.java
+++ b/src/main/java/de/mpc/pia/intermediate/compiler/parser/InputFileParserFactory.java
@@ -1,9 +1,12 @@
package de.mpc.pia.intermediate.compiler.parser;
+import java.nio.file.Files;
+import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import de.mpc.pia.intermediate.compiler.PIACompiler;
import de.mpc.pia.intermediate.compiler.parser.searchengines.MascotDatFileParser;
@@ -14,10 +17,9 @@
public class InputFileParserFactory {
/** logger for this class */
- private static final Logger LOGGER = Logger.getLogger(InputFileParserFactory.class);
+ private static final Logger LOGGER = LogManager.getLogger();
public enum InputFileTypes {
-
/**
* the input file is a FASTA database file
*/
@@ -441,27 +443,28 @@ public static List getAvailableTypeShorts() {
public static boolean getDataFromFile(String name, String fileName,
PIACompiler compiler, String additionalInfoFileName,
String fileType) {
+
+ if (!Files.exists(Path.of(fileName))) {
+ LOGGER.error("'{}' does not exist, or is not accessible", fileName);
+ return false;
+ }
if (fileType == null) {
InputFileTypes type = getFileTypeByContent(fileName);
if (type != null) {
- LOGGER.info('\'' + fileName + "' seems to be a " +
- type.getFileTypeName()+" file");
+ LOGGER.info("'{}' seems to be a {} file", fileName, type.getFileTypeName());
return type.parseFile(name, fileName, compiler, additionalInfoFileName);
}
- LOGGER.error("File '" + fileName + "' could not be parsed, " +
- "fileType could not be guessed, please specify.");
+ LOGGER.error("File '{}' could not be parsed, fileType could not be guessed, please specify.", fileName);
} else {
InputFileTypes type = getFileTypeByShortName(fileType);
if (type != null) {
- LOGGER.info('\'' + fileName + "' should be a " +
- type.getFileTypeName()+" file");
+ LOGGER.info("'{}' should be a {} file", fileName, type.getFileTypeName());
return type.parseFile(name, fileName, compiler, additionalInfoFileName);
}
- LOGGER.error("File '" + fileName + "' could not be parsed, fileType '" +
- fileType + "' unknown.");
+ LOGGER.error("File '{}' could not be parsed, fileType '{}' unknown.", fileName, fileType);
}
return false;
}