Collapse catch clauses

Use multi-catch for exceptions whenever possible.

See gh-9781
This commit is contained in:
Emanuel Campolo
2017-07-18 11:52:47 -03:00
committed by Phillip Webb
parent 4a189bdee7
commit 798fe5ed53
17 changed files with 19 additions and 76 deletions

View File

@@ -27,7 +27,6 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.beans.factory.UnsatisfiedDependencyException;
import org.springframework.boot.autoconfigure.AutoConfigurationPackages;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.data.mongo.city.City;
@@ -135,9 +134,6 @@ public class MongoDataAutoConfigurationTests {
fail("Create FieldNamingStrategy interface should fail");
}
// We seem to have an inconsistent exception, accept either
catch (UnsatisfiedDependencyException ex) {
// Expected
}
catch (BeanCreationException ex) {
// Expected
}