RED-9472: seperation of system rules
fixed checkstyle
This commit is contained in:
parent
9cb19fb0f7
commit
88155dc211
@ -75,17 +75,14 @@ public class RuleFileBluePrint {
|
||||
Set<String> newGlobals = Arrays.stream(other.getGlobals().split("\n"))
|
||||
.map(String::trim)
|
||||
.filter(line -> !line.isEmpty())
|
||||
.map(line -> line.startsWith(GLOBAL_PREFIX) ? line : GLOBAL_PREFIX + line)
|
||||
.collect(Collectors.toCollection(LinkedHashSet::new));
|
||||
|
||||
// Combine globals while maintaining order and format
|
||||
StringBuilder globalsBuilder = new StringBuilder();
|
||||
Stream.concat(existingGlobals.stream(), newGlobals.stream())
|
||||
.distinct()
|
||||
.forEach(global -> {
|
||||
if (!global.startsWith(GLOBAL_PREFIX)) {
|
||||
global = GLOBAL_PREFIX + global;
|
||||
}
|
||||
globalsBuilder.append(global).append("\n");
|
||||
});
|
||||
.forEach(globalLine -> globalsBuilder.append(globalLine).append("\n"));
|
||||
|
||||
this.globals = globalsBuilder.toString().trim();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user