summaryrefslogtreecommitdiffstats
path: root/src/examples
diff options
context:
space:
mode:
authorJaven O'Neal <onealj@apache.org>2017-02-17 08:39:05 +0000
committerJaven O'Neal <onealj@apache.org>2017-02-17 08:39:05 +0000
commit9330f2ac745722337905bf109496830f02b05a2c (patch)
treead7a386457843b5f3f231159610a2265c05f6a73 /src/examples
parent3aae3f0a5f2e914d458b39a0c93b98489a984000 (diff)
downloadpoi-9330f2ac745722337905bf109496830f02b05a2c.tar.gz
poi-9330f2ac745722337905bf109496830f02b05a2c.zip
bug 59893: commit the changes from attachment 34068 that were unrelated to available()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1783347 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/src/org/apache/poi/poifs/poibrowser/TreeReaderListener.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/examples/src/org/apache/poi/poifs/poibrowser/TreeReaderListener.java b/src/examples/src/org/apache/poi/poifs/poibrowser/TreeReaderListener.java
index d2427ce15b..a1fdc726f2 100644
--- a/src/examples/src/org/apache/poi/poifs/poibrowser/TreeReaderListener.java
+++ b/src/examples/src/org/apache/poi/poifs/poibrowser/TreeReaderListener.java
@@ -126,9 +126,10 @@ public class TreeReaderListener implements POIFSReaderListener
{
DocumentDescriptor d;
final DocumentInputStream is = event.getStream();
- if (!is.markSupported())
+ if (!is.markSupported()) {
throw new UnsupportedOperationException(is.getClass().getName() +
" does not support mark().");
+ }
/* Try do handle this document as a property set. We receive
* an exception if is no property set and handle it as a
@@ -146,11 +147,7 @@ public class TreeReaderListener implements POIFSReaderListener
}
catch (Exception t)
{
- System.err.println
- ("Unexpected exception while processing " +
- event.getName() + " in " + event.getPath().toString());
- t.printStackTrace(System.err);
- throw new RuntimeException(t.getMessage());
+ throw new RuntimeException("Unexpected exception while processing " + event.getName() + " in " + event.getPath(), t);
}
is.close();
@@ -181,9 +178,10 @@ public class TreeReaderListener implements POIFSReaderListener
final MutableTreeNode root)
{
MutableTreeNode n = pathToNode.get(path);
- if (n != null)
+ if (n != null) {
/* Node found in map, just return it. */
return n;
+ }
if (path.length() == 0)
{
/* This is the root path of the POI filesystem. Its tree