You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "John Didion (JIRA)" <ji...@codehaus.org> on 2006/04/07 15:27:48 UTC

[jira] Reopened: (CONTINUUM-651) DefaultContinuumScm.getScmRepository should not set project scm username/password if they are the empty string

     [ http://jira.codehaus.org/browse/CONTINUUM-651?page=all ]
     
John Didion reopened CONTINUUM-651:
-----------------------------------


I looked at the trunk version and it's still doing a null check instead of StringUtils.isEmpty. The reason why this is broken is the following:

1. Add a project
2. Edit project info, but leave scm username/password blank
3. The empty string gets stored in the DB for username and password (formica should probably be interpreting an empty field as null, or at least be able to be configured to do this)
4. When doing a checkout using perforce, the repository username is used in constructing the specname. If the username is blank, it results in an invalid specname. If the username is null, it just uses the user.name system property, which is the desired behavior.

> DefaultContinuumScm.getScmRepository should not set project scm username/password if they are the empty string
> --------------------------------------------------------------------------------------------------------------
>
>          Key: CONTINUUM-651
>          URL: http://jira.codehaus.org/browse/CONTINUUM-651
>      Project: Continuum
>         Type: Bug

>   Components: Core system
>     Reporter: John Didion
>     Assignee: Emmanuel Venisse

>
>
> Should be using StringUtils.isEmpty instead of doing a null check.
> {noformat}
> if ( !StringUtils.isEmpty(project.getScmUsername()) )
> {
>     providerRepository.setUser( project.getScmUsername() );
>     if ( project.getScmPassword() != null )
>     {
>         providerRepository.setPassword( project.getScmPassword() );
>     }
>     else
>     {
>         providerRepository.setPassword( "" );
>     }
> }
> {noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira