On Wed, 12 Oct 2022 17:28:42 GMT, Douglas Held <d...@openjdk.org> wrote:

> The JavaDoc for equals had a copy/paste error. I normalized the text based on 
> the JavaDoc for method java.awt.Point#equals. I also changed formatting in 
> the method signatures of equals(), hashCode() and toString().
> 
> For good measure, some kind of copy/paste detection should probably be added 
> to the many automated checks. For the entire OpenJDK project.

Changes requested by nlisker (Reviewer).

modules/javafx.graphics/src/main/java/javafx/geometry/Point3D.java line 413:

> 411: 
> 412:     /**
> 413:      * Determines whether or not two objects are equal. Two instances of 
> {@code Point3D}

Since this object is known, I would start with "Determines if this point is 
equals to a given object".

modules/javafx.graphics/src/main/java/javafx/geometry/Point3D.java line 414:

> 412:     /**
> 413:      * Determines whether or not two objects are equal. Two instances of 
> {@code Point3D}
> 414:      * are equal if the values of their x, y, and z properties are equal.

I would even write "i.f.f" because it's bidirectional.

Also, `x`, `y`, and `z` should be in `{@code}`.

modules/javafx.graphics/src/main/java/javafx/geometry/Point3D.java line 415:

> 413:      * Determines whether or not two objects are equal. Two instances of 
> {@code Point3D}
> 414:      * are equal if the values of their x, y, and z properties are equal.
> 415:      * @param obj an object to be compared with this {@code Point3D}.

We tend to put a new line before the tags to separate them from the 
description, not sure if it's enforced.

modules/javafx.graphics/src/main/java/javafx/geometry/Point3D.java line 417:

> 415:      * @param obj an object to be compared with this {@code Point3D}.
> 416:      * @return true if the object to be compared is an instance of 
> Point3D and
> 417:      * has the same values; false otherwise.

`true`, `Point3D` and `false` should be in `{@code}`.

-------------

PR: https://git.openjdk.org/jfx/pull/913

Reply via email to