Collection<File> files = FileUtils.listFiles(dirToIndex, FILE_FILTER, DIR_FILTER);
for (File file : files) {
DefaultInputFile inputFile = inputFileBuilder.create(file);
- if (inputFile != null && exclusionFilters.accept(inputFile, type))
+ if (inputFile != null && exclusionFilters.accept(inputFile, type)) {
indexFile(inputFileBuilder, fileSystem, status, inputFile, type);
}
+ }
}
private void indexFile(InputFileBuilder inputFileBuilder, DefaultModuleFileSystem fs,
/**
* Required rule name
*/
- public NewRule setName(String s) {
- this.name = StringUtils.trim(s);
+ public NewRule setName(@Nullable String s) {
+ this.name = StringUtils.trimToNull(s);
return this;
}
return this;
}
- public NewRule setHtmlDescription(String s) {
- this.htmlDescription = StringUtils.trim(s);
+ public NewRule setHtmlDescription(@Nullable String s) {
+ this.htmlDescription = StringUtils.trimToNull(s);
return this;
}