private Artifact validateArtifact(Artifact artifact) throws RepositoryManagerException {
        Set<ConstraintViolation<Artifact>> violations = validator.validate(artifact);
        if (!violations.isEmpty()) {
            throw new RepositoryManagerException("Repository manager returned invalid artifact: " + artifact.toString() + " Constraint Violations: %s", violations);
        }
        return artifact;
    }
private Artifact validateArtifact(Artifact artifact) throws RepositoryManagerException {
        Set<ConstraintViolation<Artifact>> violations = validator.validate(artifact);
        if (!violations.isEmpty()) {
            throw new RepositoryManagerException("Repository manager returned invalid artifact: " + artifact.toString() + " Constraint Violations: %s", violations);
        }
        return artifact;
    }
private Artifact validateArtifact ( Artifact artifact ) throws RepositoryManagerException { Set < ConstraintViolation < Artifact >> violations = validator . validate ( artifact ) ; if ( ! violations . isEmpty ( ) ) { throw new RepositoryManagerException ( "Repository manager returned invalid artifact: " + artifact . toString ( ) + " Constraint Violations: %s" , violations ) ; } return artifact ; }
Check artifact for any validation errors.  If there are constraint violations, then a RepositoryManagerException is thrown.
Otherwise the artifact is returned.

@param artifact to validate
@return the same artifact
@throws RepositoryManagerException if there are constraint violations
Check artifact for any validation errors . If there are constraint violations then a RepositoryManagerException is thrown . Otherwise the artifact is returned .