in log4j-converter-plugin-descriptor/src/main/java/org/apache/logging/log4j/converter/plugins/internal/PluginDescriptors.java [364:381]
private Plugin merge(final Plugin other) {
// Intentionally ignore `elementName`
if (!this.className.equals(other.className)
|| this.printable != other.printable
|| this.defer != other.defer) {
throw new IllegalArgumentException(
"Attempting to merge incompatible plugins: " + this + " and " + other);
}
final Set<String> pluginNames = new TreeSet<>(this.pluginNames);
pluginNames.addAll(other.pluginNames);
return new Plugin(
Collections.unmodifiableSet(pluginNames),
this.elementName,
this.className,
this.printable,
this.defer,
this.builderHierarchy);
}