From 9580811683f780fad69bcb19342925aa000b1495 Mon Sep 17 00:00:00 2001 From: Ralph Soika Date: Fri, 2 Aug 2024 13:56:44 +0200 Subject: [PATCH] impl Issue #352 --- .../java/org/openbpmn/bpmn/util/BPMNModelFactory.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/util/BPMNModelFactory.java b/open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/util/BPMNModelFactory.java index d86f3834..a8abf1a5 100644 --- a/open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/util/BPMNModelFactory.java +++ b/open-bpmn.metamodel/src/main/java/org/openbpmn/bpmn/util/BPMNModelFactory.java @@ -5,8 +5,6 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; -import java.nio.file.Path; -import java.nio.file.Paths; import java.util.logging.Logger; import javax.xml.parsers.DocumentBuilder; @@ -104,8 +102,7 @@ public static BPMNModel createInstance(String exporter, String exporterVersion, */ public static BPMNModel read(File modelFile) throws BPMNModelException { try { - Path path = modelFile.toPath(); - return read(new FileInputStream(modelFile), path); + return read(new FileInputStream(modelFile)); } catch (FileNotFoundException e) { e.printStackTrace(); } @@ -121,8 +118,7 @@ public static BPMNModel read(File modelFile) throws BPMNModelException { * @throws IOException */ public static BPMNModel read(String modelFilePath) throws BPMNModelException { - Path path = Paths.get(modelFilePath); - return read(BPMNModel.class.getResourceAsStream(modelFilePath), path); + return read(BPMNModel.class.getResourceAsStream(modelFilePath)); } /** @@ -141,7 +137,7 @@ public static BPMNModel read(String modelFilePath) throws BPMNModelException { * @throws FileNotFoundException * @throws IOException */ - public static BPMNModel read(InputStream is, Path path) throws BPMNModelException { + public static BPMNModel read(InputStream is) throws BPMNModelException { logger.fine("read from inputStream..."); DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); docFactory.setIgnoringElementContentWhitespace(true); // because of a bug this does not have any effect!