Skip to content

Commit

Permalink
impl
Browse files Browse the repository at this point in the history
Issue #352
  • Loading branch information
rsoika committed Aug 2, 2024
1 parent 56fd53e commit 9580811
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}
Expand All @@ -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));
}

/**
Expand All @@ -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!
Expand Down

0 comments on commit 9580811

Please sign in to comment.