diff --git a/spring-test/src/main/java/org/springframework/test/util/JsonPathExpectationsHelper.java b/spring-test/src/main/java/org/springframework/test/util/JsonPathExpectationsHelper.java index cbb74dc6e4..e1d9d1615c 100644 --- a/spring-test/src/main/java/org/springframework/test/util/JsonPathExpectationsHelper.java +++ b/spring-test/src/main/java/org/springframework/test/util/JsonPathExpectationsHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -227,13 +227,7 @@ public class JsonPathExpectationsHelper { try { return this.jsonPath.read(content); } - catch (InvalidPathException ex) { - throw new AssertionError(message + ex.getMessage()); - } - catch (ArrayIndexOutOfBoundsException ex) { - throw new AssertionError(message + ex.getMessage()); - } - catch (IndexOutOfBoundsException ex) { + catch (InvalidPathException | IndexOutOfBoundsException ex) { throw new AssertionError(message + ex.getMessage()); } }