String format was simplicity of implementing, do you prefer inlining?

On Thursday, October 17, 2013, Jake Wharton wrote:

> In butterknife/src/test/java/butterknife/internal/OnClickTest.java:
>
> > +    final JavaFileObject source = JavaFileObjects.forSourceString("test.Test",
> > +        Joiner.on('\n').join(
> > +            "package test;",
> > +            "import android.app.Activity;",
> > +            "import butterknife.OnClick;",
> > +            "public class Test extends Activity {",
> > +            "  @OnClick(1)",
> > +            "  public static void doStuff() {",
> > +            "  }",
> > +            "}"));
> > +
> > +    ASSERT.about(javaSource()).that(source)
> > +        .processedWith(butterknifeProcessors())
> > +        .failsToCompile()
> > +        .withErrorContaining(
> > +            String.format("@OnClick methods must not be private or static (%s).",
>
> Any reason you're using String.format for all these instead of just
> inlining the class and package name?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/JakeWharton/butterknife/pull/72/files#r7024902>
> .
>


-- 

-- 
Dandré Allison                                (323) 823-4456
KeepandShare.com <http://www.keepandshare.com>


              Schedule & Share. Simply. Securely.