private static void ensureRootFilesConfigured(
     RootFilesProperties rootProperties, ConfigSpec configuration) {
   if (rootProperties.getFileMap().keySet().size() == 0) {
     String message;
     if (configuration.equals(ConfigSpec.GLOBAL)) {
       message = "Cannot set permissions or symbolic links if there are no root files";
     } else {
       message =
           "Cannot set permissions or symbolic links for "
               + configuration.toOsString()
               + " if there are no root files for that configuration";
     }
     throw new IllegalArgumentException(message);
   }
 }