This repository was archived by the owner on Oct 31, 2024. It is now read-only.
File tree 2 files changed +5
-11
lines changed
jmespath-core/src/test/java/io/burt/jmespath
2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,8 @@ private Description createDescription(JmesPathComplianceTest.ComplianceTest<T> c
29
29
private Collection <JmesPathComplianceTest .ComplianceTest <T >> getAllTests () {
30
30
try {
31
31
return testClass .newInstance ().getAllTests ();
32
- } catch (InstantiationException ie ) {
33
- throw new RuntimeException ("Could not instantiate runtime" , ie );
34
- } catch (IllegalAccessException iae ) {
35
- throw new RuntimeException ("Could not instantiate runtime" , iae );
32
+ } catch (InstantiationException | IllegalAccessException e ) {
33
+ throw new RuntimeException ("Could not instantiate runtime" , e );
36
34
}
37
35
}
38
36
@@ -42,9 +40,7 @@ public void run(RunNotifier notifier) {
42
40
notifier .fireTestStarted (testDescription );
43
41
try {
44
42
complianceTest .run ();
45
- } catch (AssertionError ae ) {
46
- notifier .fireTestFailure (new Failure (testDescription , ae ));
47
- } catch (Exception e ) {
43
+ } catch (AssertionError | Exception e ) {
48
44
notifier .fireTestFailure (new Failure (testDescription , e ));
49
45
} finally {
50
46
notifier .fireTestFinished (testDescription );
Original file line number Diff line number Diff line change @@ -137,10 +137,8 @@ public Iterable<String> getFeatureNames() {
137
137
}
138
138
}
139
139
return featureNames ;
140
- } catch (IOException ioe ) {
141
- throw new RuntimeException ("Could not load compliance feature names" , ioe );
142
- } catch (URISyntaxException use ) {
143
- throw new RuntimeException ("Could not load compliance feature names" , use );
140
+ } catch (IOException | URISyntaxException e ) {
141
+ throw new RuntimeException ("Could not load compliance feature names" , e );
144
142
}
145
143
}
146
144
You can’t perform that action at this time.
0 commit comments