From a419e76793280f84d0fec232427bc90d9112f346 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Tue, 11 Aug 2020 17:45:13 +0200 Subject: [PATCH] Add file checks --- src/main/java/w2phtml/rdf/Metadata.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/w2phtml/rdf/Metadata.java b/src/main/java/w2phtml/rdf/Metadata.java index 20a6d3d..27b63b7 100644 --- a/src/main/java/w2phtml/rdf/Metadata.java +++ b/src/main/java/w2phtml/rdf/Metadata.java @@ -23,8 +23,11 @@ public class Metadata { } public void read(String metadataFilePath) { + if (metadataFilePath == null) { + return; + } File file = new File(metadataFilePath); - if (!file.exists()) { + if (!file.exists() || !file.canRead()) { return; } readCSVFile(metadataFilePath);