public String providePassword(Item item) {
        return isUsingCredentialsPlugin() ? PluginsUtils.credentialsLookup(credentialsId, item).getPassword() : credentials.getPassword();
    }
public String providePassword ( Item item ) { return isUsingCredentialsPlugin ( ) ? PluginsUtils . credentialsLookup ( credentialsId , item ) . getPassword ( ) : credentials . getPassword ( ) ; }
Not like getPassword this will return the username of the current Credentials mode of the system (legacy/credentials plugin)

@return the password that should be apply in this configuration