Skip to content

Commit dda1a6b

Browse files
author
TheSnoozer
committed
#317: Since Maven is still to stupid to check the for nested objects at least fail as early as possible with a somewhat meaningfull message when the required parameters are not set
1 parent 9d93796 commit dda1a6b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/pl/project13/maven/git/TransformationRule.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ public void setApply(String apply) {
9494
}
9595

9696
public ApplyEnum getApplyRule() {
97+
if(applyRule == null) {
98+
throw new IllegalStateException("The parameter 'apply' for TransformationRule is missing or invalid");
99+
}
97100
return applyRule;
98101
}
99102

@@ -107,6 +110,9 @@ public void setAction(String action) {
107110
}
108111

109112
public ActionEnum getActionRule() {
113+
if(actionRule == null) {
114+
throw new IllegalStateException("The parameter 'action' for TransformationRule is missing or invalid");
115+
}
110116
return actionRule;
111117
}
112118
}

0 commit comments

Comments
 (0)