Optionally enforce required elements in XSDs#263
Optionally enforce required elements in XSDs#263kwin merged 3 commits intocodehaus-plexus:masterfrom
Conversation
|
|
| * @since 2.1.0 | ||
| */ | ||
| @Parameter( defaultValue = "true") | ||
| private boolean areMandatoryElementsNotEnforced; |
There was a problem hiding this comment.
This does not look very usual to have a boolean property starting with is or are.
Usually, the getters are written isXxx but the field is most often named without the is/are prefix.
I would propose to invert it and name it enforceMandatoryElements and default it to false.
There was a problem hiding this comment.
I can rename but the default should be to enforce mandatory elements. The POM case is really an unusual edge case IMHO
There was a problem hiding this comment.
I may have missed something, but the current default value is true for not enforcing mandatory elements. I'm fine with changing the default value though.
There was a problem hiding this comment.
The javadoc should be changed accordingly if the default value is to be changed.
There was a problem hiding this comment.
Sorry, my bad. I will think again about defaults.
There was a problem hiding this comment.
Lets start with the default being no enforcement for backwards-compatibility.
leave out negation
This closes #162