The following pattern:
public class MyClass {
final String[] targets;
MyClass(String target) {
this.targets = new String[]{target};
}
MyClass(String[] targets) {
this.targets = targets;
}
MyClass(String target, String... targets) {
String[] newTargets = new String[targets.length + 1];
newTargets[0] = target;
System.arraycopy(targets, 0, newTargets, 1, targets.length);
this(newTargets);
}
}
Cause a ChainingConstructorIgnoresParameter false-positive!
Found out while doing stuff on my project, original code is there:
https://github.com/Fox2Code/Hypertale/blob/master/patcher/src/main/java/com/fox2code/hypertale/patcher/patches/HypertalePatch.java