Hi Jesse,

Thanks for your answer, so that's what I thought. I was a bit worried
because there was no @NonNull annotation on the method and was wondering
which case it could be.

Thanks !

Le jeu. 23 sept. 2021 à 14:19, Jesse Glick <[email protected]> a écrit :

> Sorry, just noticed today that this never got a reply.
>
> On Fri, Sep 3, 2021 at 11:01 AM Goyot, Martin <[email protected]>
> wrote:
>
>> Which one should I build upon ? Is it the revision or the head ? Or both
>> depending on the context ?
>>
>
> A revision (commit) is more specific than a head (ref) so use a revision
> if present, and ignore the head unless you need it for some auxiliary
> purpose.
>
> I've seen that the revision can be null. In which cases is this possible ?
>>
>
> Do you mean in Builder.build
> <https://javadoc.jenkins.io/plugin/scm-api/jenkins/scm/api/SCMFileSystem.Builder.html#build(jenkins.scm.api.SCMSource,jenkins.scm.api.SCMHead,jenkins.scm.api.SCMRevision)>?
> Did you actually *observe* a null parameter, or are just concerned by the
> method specification? I would just return null in such cases unless a use
> case comes up, though you can also retrieve the current head revision. The 
> implementor’s
> guide
> <https://github.com/jenkinsci/scm-api-plugin/blob/master/docs/implementation.adoc>
>  does
> not seem to discuss `SCMFileSystem.Builder` in detail.
>
> If in doubt, follow the example of `github-branch-source`.
>
> --
> 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/CANfRfr2r_D%3DMiJnTPww9-uL5emHc70TD%3DLs%3D%3D_7%2B6KJqoqbn2g%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2r_D%3DMiJnTPww9-uL5emHc70TD%3DLs%3D%3D_7%2B6KJqoqbn2g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CA%2Bb6JB8eanY%2BsBrKFW90E1s3fc3k0p%3D3iRYyr6tU%3D_GvupHV_A%40mail.gmail.com.

Reply via email to