Kind ironic first answer was more helpful because it when it didn't work it 
forced me to look at the code behind findCredentialById and to this code:

    List<IdCredentials> candidates = new ArrayList<>(
                    CredentialsProvider.lookupCredentials(MyCredentialsImpl.
class, (Item)null, null, Collections.<DomainRequirement>emptyList())
                    );


    return Test(secretId, (MyCredentialsImpl)CredentialsMatchers.firstOrNull
(candidates, CredentialsMatchers.withId(secretId)));


And your answer was the cold water that I needed to use it.  ;)

Thanks for the help.

On Thursday, July 23, 2020 at 9:39:44 AM UTC-4, Jesse Glick wrote:
>
> On Thu, Jul 23, 2020 at 8:51 AM Michael Carter 
> <[email protected] <javascript:>> wrote: 
> >     StandardCredentials credResult = 
> CredentialsProvider.findCredentialById(secretId, 
> >                                                                         
>     StandardCredentials.class, 
> >                                                                         
>     run, 
> >                                                                         
>     Collections.<DomainRequirement>emptyList()); 
> > 
> > The run parameter can't be null.   So how do I create a dummy run 
>
> You cannot. You must not use that method. Find another. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/8b123f81-c5c2-4a1f-8dee-4e42c3f2cae4o%40googlegroups.com.

Reply via email to