Skip to content

Commit

Permalink
remove unneaded exception when reading json
Browse files Browse the repository at this point in the history
  • Loading branch information
rainer-prosi committed Oct 11, 2024
1 parent 7fcc159 commit 99883f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/main/java/org/cip4/tools/jdfeditor/JDFTreeModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ public JDFTreeModel(final JDFTreeNode _root, final boolean ignoreAttributes)
public boolean validate()
{
// this may be what needs to be done (i.e. getFrame()) for the variables in other methods that are being moved from JDFFrame to here.
final JDFFrame m_frame = MainView.getFrame();
final EditorDocument eDoc = MainView.getEditorDoc();
if (eDoc == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.ZipEntry;

import org.cip4.jdflib.core.JDFDoc;
import org.cip4.jdflib.util.FileUtil;
Expand All @@ -79,6 +80,7 @@

/**
* simple implementation for a zip stream loader
*
* @author rainer prosi
* @date Sep 5, 2013
*/
Expand All @@ -100,9 +102,9 @@ public JDFDoc read(final File fileJDF, final File fileSchema) throws IOException
public JDFDoc readStream(final InputStream jdf, final InputStream schema) throws IOException
{
final ZipReader zr = new ZipReader(jdf);
zr.getNextEntry();
final ZipEntry e = zr.getNextEntry();
zr.close();
return zr.getJDFDoc();
return e == null ? null : zr.getJDFDoc();
}

}

0 comments on commit 99883f0

Please sign in to comment.