Use a static helper method:
public Triangle(Triangle other) {
super(clonePoints(other));
}
private static Point[] clonePoints(Triangle other) {
if (other == null) {
// ...
}
return other.getPoints().clone();
}
Also, what I often do is create a more generic helper method as such:
public Triangle(Triangle other) {
super(neverNull(other).getPoints().clone());
}
private static <S extends Shape> S neverNull(S notNull) {
if (notNull == null) {
// throw a meaningful exception
// or return a default value for S if possible / reasonable
}
return notNull;
}