Yes, it will cause aliasing.
My guess is that you're trying to create a copy of the object, than you want to instantiate a new Point
.
That being said, if you Don't actually need to make a copy of the object, then the first one will do
so if you call it like
Line line = new Line()
line.setP1(new Point(/*params*/))
that's perfectly okay.