For future reference, can use:

    `checkArgument(sensor.getName().startsWith(CHEF_ATTRIBUTE_PREFIX), "sensor name must be prefixed %s for autodetection to work", CHEF_ATTRIBUTE_PREFIX);`

which avoids creating strings in the call (i.e. avoids creating objects, which causes work for the garbage collector). But thinking about this particular case more, the compiler almost certainly optimised it away as  it's concatenating constants.