Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8176040: Documentation of java.awt.Rectangle.add(java.awt.Point) is w…
…rong

Reviewed-by: serb, prr
  • Loading branch information
Alexander Zuev committed Mar 8, 2020
1 parent bce8149 commit 315635ea097331d9e8692aa404ddb93e2568f11a
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/java.desktop/share/classes/java/awt/Rectangle.java
@@ -922,7 +922,7 @@ public Rectangle union(Rectangle r) {
* If the specified point must be contained within the new
* {@code Rectangle}, a 1x1 rectangle should be added instead:
* <pre>
* r.add(newx, newy, 1, 1);
* r.add(new Rectangle(newx, newy, 1, 1));
* </pre>
* @param newx the X coordinate of the new point
* @param newy the Y coordinate of the new point
@@ -973,7 +973,7 @@ public void add(int newx, int newy) {
* If the specified point must be contained within the new
* {@code Rectangle}, a 1x1 rectangle should be added instead:
* <pre>
* r.add(pt.x, pt.y, 1, 1);
* r.add(new Rectangle(pt, new Dimension(1, 1)));
* </pre>
* @param pt the new {@code Point} to add to this
* {@code Rectangle}

0 comments on commit 315635e

Please sign in to comment.