Repository: commons-lang
Updated Branches:
  refs/heads/master aaeb4c621 -> 5bdf0a938


ObjectUtilsTest#testIdentityToStringAppendable: fail test if IOException is 
thrown


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/5bdf0a93
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/5bdf0a93
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/5bdf0a93

Branch: refs/heads/master
Commit: 5bdf0a938adb384bfdb6cc494a2781e2ac33b0ea
Parents: aaeb4c6
Author: pascalschumacher <pascalschumac...@gmx.net>
Authored: Tue Feb 14 22:59:12 2017 +0100
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Tue Feb 14 22:59:12 2017 +0100

----------------------------------------------------------------------
 src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/5bdf0a93/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java 
b/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java
index 5d3f0a2..803e4d8 100644
--- a/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java
@@ -257,13 +257,17 @@ public class ObjectUtilsTest {
         try {
             ObjectUtils.identityToString((Appendable)null, "tmp");
             fail("NullPointerException expected");
-        } catch(final NullPointerException | IOException npe) {
+        } catch(final NullPointerException expectedException) {
+        } catch(final IOException ex) {
+          fail("IOException unexpected");
         }
 
         try {
             ObjectUtils.identityToString((Appendable)(new StringBuilder()), 
null);
             fail("NullPointerException expected");
-        } catch(final NullPointerException | IOException npe) {
+        } catch(final NullPointerException expectedException) {
+        } catch(final IOException ex) {
+          fail("IOException unexpected");
         }
     }
 

Reply via email to