2013/10/9 Valentin v. Seggern <notifications@github.com>
> In src/com/crowflying/buildwatch/jenkins/CrumbInfo.java:
> > @@ -0,0 +1,39 @@
> > +package com.crowflying.buildwatch.jenkins;
> > +
> > +import android.util.Pair;
> > +
> > +public class CrumbInfo {
> > + private String crumb;
> > + private String crumbRequestField;
> > + private boolean crumbRequired;
> I think the code would be a bit clearer without this crumbRequired field. Currently there are 2 conditions that determine wether the CSRF token should be fetched - this field and the check below if the method == POST.

If CSRF protection isn't enabled, no crumb is needed (and, in fact,
none are issued). The crumbRequired field defaults to false, and only
if jenkins's crumbIssuer gives a useful response (indicating that CSRF
protection is enabled) does crumbRequired get set to true.

Based on your later comment you may have already realised this, but
explaining it anyway for the benefit of others.