Skip to content

Commit

Permalink
Renamed validate method #3133
Browse files Browse the repository at this point in the history
  • Loading branch information
lorriborri committed May 22, 2024
1 parent f008140 commit e29b4c6
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ public SecHubConfigurationModelValidator() {
* @param model
* @return validation result
*/
public SecHubConfigurationModelValidationResult validateRemoteData(SecHubConfigurationModel model) {
public SecHubConfigurationModelValidationResult validate(SecHubConfigurationModel model) {
SecHubConfigurationModelValidationResult result = new SecHubConfigurationModelValidationResult();
InternalValidationContext context = new InternalValidationContext();
context.result = result;
context.model = model;
validateRemoteData(context);
validate(context);
return result;
}

Expand Down Expand Up @@ -128,7 +128,7 @@ private void handleMetaDataLabels(Map<String, String> labels, SecHubConfiguratio
}
}

private void validateRemoteData(InternalValidationContext context) {
private void validate(InternalValidationContext context) {
if (context.model == null) {
context.result.addError(MODEL_NULL);
return;
Expand Down Expand Up @@ -563,7 +563,7 @@ private void validateRemoteDataConfiguration(InternalValidationContext context,

validateOnlyOneRemoteSourceOrBinary(sourcesAndBinaries, result);
validateRemoteAndFileSystemAreNotMixed(sourcesAndBinaries, result);
validateRemoteData(sourcesAndBinaries, result);
validate(sourcesAndBinaries, result);
}

private void validateOnlyOneRemoteSourceOrBinary(Collection<? extends SecHubDataConfigurationObject> sourcesAndBinaries,
Expand Down Expand Up @@ -603,7 +603,7 @@ private void validateRemoteAndFileSystemAreNotMixed(Collection<? extends SecHubD
}
}

private void validateRemoteData(Collection<? extends SecHubDataConfigurationObject> sourcesAndBinaries, SecHubConfigurationModelValidationResult result) {
private void validate(Collection<? extends SecHubDataConfigurationObject> sourcesAndBinaries, SecHubConfigurationModelValidationResult result) {
for (SecHubDataConfigurationObject sourceOrBinary : sourcesAndBinaries) {
Optional<SecHubRemoteDataConfiguration> optRemoteData = sourceOrBinary.getRemote();

Expand Down
Loading

0 comments on commit e29b4c6

Please sign in to comment.