From a3138f55b4087164b4f8e86fabca07620a4e548b Mon Sep 17 00:00:00 2001 From: tim_graves <28924492+atimgraves@users.noreply.github.com> Date: Thu, 10 Oct 2024 12:23:48 +0100 Subject: [PATCH] Update JarFileLoader.java --- .../timg/demo/dependencyanalyser/importers/JarFileLoader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dependencyanalyser/src/main/java/com/oracle/timg/demo/dependencyanalyser/importers/JarFileLoader.java b/dependencyanalyser/src/main/java/com/oracle/timg/demo/dependencyanalyser/importers/JarFileLoader.java index 298c4d6..d090fa3 100644 --- a/dependencyanalyser/src/main/java/com/oracle/timg/demo/dependencyanalyser/importers/JarFileLoader.java +++ b/dependencyanalyser/src/main/java/com/oracle/timg/demo/dependencyanalyser/importers/JarFileLoader.java @@ -108,7 +108,7 @@ public JarTree loadDependencyTree(File sourceFile, File origionalSourceFile) thr // if we loaded the jar details then we will use them later, but if we didn't // then fall back to trying to get them from the pom if (jarFileIdentifiedJarVerion == null) { - if (pomXMLEntry.isEmpty()) { + if (!pomXMLEntry.isPresent()) { throw new JarFIleProcessorException("Unfortunately jar file " + sourceFile.getPath() + " does not containe a usable pom.properties file or pom.xml file, cannot process this jar file"); } @@ -131,7 +131,7 @@ public JarTree loadDependencyTree(File sourceFile, File origionalSourceFile) thr } // have to check for the pom file directly as we may have gotten the info from // the pom.properties file - if (pomXMLEntry.isEmpty()) { + if (!pomXMLEntry.isPresent()) { throw new JarFIleProcessorException("Unfortunately jar file " + sourceFile.getPath() + " does not containe a pom.xml file, cannot process this jar file"); }