Skip to content

Commit f15a313

Browse files
committed
CombineAnnotations: fix exception handling
Yes, it is a deprecated class, so not too important, but... the previous logic felt like bugs crawling all over me.
1 parent 0cca57c commit f15a313

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/org/scijava/util/CombineAnnotations.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,14 @@ public void combine() throws IOException, ClassNotFoundException {
5959
try {
6060
combiner.combine(null);
6161
}
62-
catch (Exception e) {
62+
catch (final Exception e) {
6363
if (e instanceof IOException) {
64-
throw new IOException(e.getMessage());
64+
throw (IOException) e;
6565
}
6666
if (e instanceof ClassNotFoundException) {
67-
throw new ClassNotFoundException(e.getMessage());
67+
throw (ClassNotFoundException) e;
6868
}
69+
throw new IOException(e);
6970
}
7071
}
7172

0 commit comments

Comments
 (0)