<div dir="ltr"><div>I came across a potential mistake in the class com.sun.javafx.geom.AreaOp. It uses raw Vector types and while trying to add generic parameters there for type safety, I got some conflicts.</div><div><br></div><div>In the method AreaOp::calculate, the arguments should be Vector<Curve> and the return type should also be Vector<Curve>, but it returns a Vector called 'edges'. 'edges' is passed to the 'addEdges' method that should take Vector<Edge> and Vector<Curve>. This means that 'edges' is a Vector<Edge> and not Vector<Curve>. Already a conflict.</div><div>Then it is passed to 'pruneEdges', which, if it takes and returns Vector<Edge>, runs into a conflict with the return type: 'Vector ret' has Curve added to it. If I try to return Vector<Curve> instead, then in the 'numedges < 2' check the input Vector can't be returned unless it's also Vector<Curve>, which again causes a conflict in 'calculate'.</div><div><br></div><div>There are also 'toArray' calls that seem to not do anything, like in 'resolveLinks' (line 454) and in 'finalizeSubCurves' (429).</div><div><br></div><div>Can anyone who knows this part of the code take a look?</div><div><br></div><div>- Nir</div></div>