--- old/src/java.desktop/share/classes/java/awt/Rectangle.java 2020-03-02 19:55:29.000000000 +0300 +++ new/src/java.desktop/share/classes/java/awt/Rectangle.java 2020-03-02 19:55:29.000000000 +0300 @@ -922,7 +922,7 @@ * If the specified point must be contained within the new * {@code Rectangle}, a 1x1 rectangle should be added instead: *
- * r.add(newx, newy, 1, 1); + * r.add(new Rectangle(newx, newy, 1, 1)); ** @param newx the X coordinate of the new point * @param newy the Y coordinate of the new point @@ -973,7 +973,7 @@ * If the specified point must be contained within the new * {@code Rectangle}, a 1x1 rectangle should be added instead: *
- * r.add(pt.x, pt.y, 1, 1); + * r.add(new Rectangle(pt.x, pt.y, 1, 1)); ** @param pt the new {@code Point} to add to this * {@code Rectangle}