< prev index next >

src/java.desktop/share/classes/java/awt/Polygon.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -80,11 +80,11 @@
      *
      * @serial
      * @see #addPoint(int, int)
      * @since 1.0
      */
-    public int xpoints[];
+    public int[] xpoints;
 
     /**
      * The array of Y coordinates.  The number of elements in
      * this array might be more than the number of Y coordinates
      * in this {@code Polygon}.  The extra elements allow new points

@@ -94,11 +94,11 @@
      *
      * @serial
      * @see #addPoint(int, int)
      * @since 1.0
      */
-    public int ypoints[];
+    public int[] ypoints;
 
     /**
      * The bounds of this {@code Polygon}.
      * This value can be null.
      *

@@ -142,11 +142,11 @@
      *             or the length of {@code ypoints}.
      * @exception  NullPointerException if {@code xpoints} or
      *             {@code ypoints} is {@code null}.
      * @since 1.0
      */
-    public Polygon(int xpoints[], int ypoints[], int npoints) {
+    public Polygon(int[] xpoints, int[] ypoints, int npoints) {
         // Fix 4489009: should throw IndexOutOfBoundsException instead
         // of OutOfMemoryError if npoints is huge and > {x,y}points.length
         if (npoints > xpoints.length || npoints > ypoints.length) {
             throw new IndexOutOfBoundsException("npoints > xpoints.length || "+
                                                 "npoints > ypoints.length");

@@ -224,11 +224,11 @@
      * Sets {@code bounds} to the result.
      * @param xpoints[] array of <i>x</i> coordinates
      * @param ypoints[] array of <i>y</i> coordinates
      * @param npoints the total number of points
      */
-    void calculateBounds(int xpoints[], int ypoints[], int npoints) {
+    void calculateBounds(int[] xpoints, int[] ypoints, int npoints) {
         int boundsMinX = Integer.MAX_VALUE;
         int boundsMinY = Integer.MAX_VALUE;
         int boundsMaxX = Integer.MIN_VALUE;
         int boundsMaxY = Integer.MIN_VALUE;
 
< prev index next >