private FileSetDescriptor initDescriptor(ConfigSpec configuration, String configurationAsString) {
   String fileSetDescriptorKey =
       configuration.equals(ConfigSpec.GLOBAL)
           ? RootPropertiesParser.ROOT_KEY_SEGMENT
           : RootPropertiesParser.ROOT_KEY_SEGMENT + '.' + configurationAsString;
   FileSetDescriptor rootFilesDescriptor =
       new FileSetDescriptor(fileSetDescriptorKey, configurationAsString);
   return rootFilesDescriptor;
 }
 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);
   }
 }