jts icon indicating copy to clipboard operation
jts copied to clipboard

copy() methods should have assertions that they are called from their own class

Open metteo opened this issue 9 years ago • 0 comments

First line of every copy(): assert getClass() == < LiteralOfImplementingClass >.class

Mainly to limit cases where copy is used and only partial copy would be provided. This is not needed in case of clone() because it makes shallow copy automatically.

Something else than assert is also feasible.

metteo avatar Sep 01 '14 18:09 metteo