Skip to content

Commit

Permalink
implemented requested changes
Browse files Browse the repository at this point in the history
changed default of vaidate allowMonolothicConfiguration to false
changed TemplateSetConfigurationReader validate to non monolithic
removed catch of NotYetSupportedException from ContextConfigurationReader validate process
  • Loading branch information
jan-vcapgemini committed Apr 3, 2023
1 parent a25b371 commit 01ef924
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import com.devonfw.cobigen.api.constants.ConfigurationConstants;
import com.devonfw.cobigen.api.exception.ConfigurationConflictException;
import com.devonfw.cobigen.api.exception.InvalidConfigurationException;
import com.devonfw.cobigen.api.exception.NotYetSupportedException;
import com.devonfw.cobigen.api.util.ExceptionUtil;
import com.devonfw.cobigen.api.util.JvmUtil;
import com.devonfw.cobigen.impl.config.constant.ContextConfigurationVersion;
Expand Down Expand Up @@ -216,11 +215,7 @@ private void readConfiguration() {
"The required 'version' attribute of node \"contextConfiguration\" has not been set");
} else {
VersionValidator validator = new VersionValidator(Type.CONTEXT_CONFIGURATION, MavenMetadata.VERSION);
try {
validator.validate(configVersion.floatValue());
} catch (NotYetSupportedException e) {
// TODO
}
validator.validate(configVersion.floatValue());
}
} else {
throw new InvalidConfigurationException(contextFile,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public void readConfiguration(Path templateSetFile) {
"The required 'version' attribute of node \"templateSetConfiguration\" has not been set");
} else {
VersionValidator validator = new VersionValidator(Type.TEMPLATE_SET_CONFIGURATION, MavenMetadata.VERSION);
validator.validate(configVersion.floatValue());
validator.validate(configVersion.floatValue(), false);
}
} else {
throw new InvalidConfigurationException(this.templateSetFile,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public VersionValidator(Type validatorType, String cobiGenVersion) {
*/
public void validate(float configVersion) {

validate(configVersion, true);
validate(configVersion, false);
}

/**
Expand Down

0 comments on commit 01ef924

Please sign in to comment.