Skip to content
Permalink
Browse files
Code cleanup
  • Loading branch information
effrafax committed Jul 4, 2021
1 parent 11d4694 commit 04a35ef27958782fc73db6429bf8a235298ca021
Showing 2 changed files with 3 additions and 9 deletions.
@@ -92,13 +92,9 @@ public ValidationResponse<RepositoryGroup> apply( RepositoryGroup repositoryGrou

if (StringUtils.isBlank( repositoryGroup.getName() )) {
errors = appendError( errors, "name", ISEMPTY );
} else
} else if ( !REPOSITORY_NAME_VALID_EXPRESSION_PATTERN.matcher( repositoryGroup.getName( ) ).matches( ) )
{
matcher = REPOSITORY_NAME_VALID_EXPRESSION_PATTERN.matcher( repositoryGroup.getName( ) );
if ( !matcher.matches( ) )
{
errors = appendError( errors, "name", INVALID_CHARS, repoGroupId, REPOSITORY_NAME_ALLOWED );
}
errors = appendError( errors, "name", INVALID_CHARS, repoGroupId, REPOSITORY_NAME_ALLOWED );
}


@@ -95,9 +95,7 @@ else if ( repositoryRegistry.hasRepositoryGroup( repoId ) )
if ( StringUtils.isBlank( managedRepository.getName() ) )
{
errors = appendError( errors, "name", ISEMPTY );
}

if ( !REPOSITORY_NAME_VALID_EXPRESSION_PATTERN.matcher( managedRepository.getName() ).matches( ) )
} else if ( !REPOSITORY_NAME_VALID_EXPRESSION_PATTERN.matcher( managedRepository.getName( ) ).matches( ) )
{
errors = appendError( errors, "name", INVALID_CHARS, managedRepository.getName( ), REPOSITORY_NAME_ALLOWED );
}

0 comments on commit 04a35ef

Please sign in to comment.