mirror of https://github.com/apache/archiva.git
Code cleanup
This commit is contained in:
parent
11d469489e
commit
04a35ef279
|
@ -92,13 +92,9 @@ public class BasicRepositoryGroupValidator extends AbstractRepositoryValidator<R
|
|||
|
||||
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 @@ public class BasicManagedRepositoryValidator extends AbstractRepositoryValidator
|
|||
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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue