Skip to content

Commit 4d26f89

Browse files
committed
merge catch blocks
1 parent 766dee1 commit 4d26f89

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfo.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ public String getReleaseVersionString() {
7070
try {
7171
VersionPolicyRequest request = new VersionPolicyRequest().setVersion(this.toString());
7272
return versionPolicy.getReleaseVersion(request).getVersion();
73-
} catch (PolicyException ex) {
74-
throw new RuntimeException("Unable to get release version from policy.", ex);
75-
} catch (VersionParseException ex) {
73+
} catch (PolicyException | VersionParseException ex) {
7674
throw new RuntimeException("Unable to get release version from policy.", ex);
7775
}
7876
}
@@ -119,9 +117,7 @@ private String nextVersion(final Integer index, boolean snapshot) {
119117
else {
120118
return versionPolicy.getReleaseVersion(request).getVersion();
121119
}
122-
} catch (PolicyException ex) {
123-
throw new RuntimeException("Unable to get development version from policy.", ex);
124-
} catch (VersionParseException ex) {
120+
} catch (PolicyException | VersionParseException ex) {
125121
throw new RuntimeException("Unable to get development version from policy.", ex);
126122
}
127123
}

0 commit comments

Comments
 (0)