/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
/**
* @test
* @bug 7047069
* @summary Array can dynamically change size when assigned to an object field
*
*/
public class Test7047069 {
static boolean verbose;
// for testing against squared lengths
// Note that this must be long enough
// to store a full cubic segment and
// a relative cubic segment to avoid
// aliasing when copying the coords
// of a curve to the end of the array.
// This is also serendipitously equal
// to the size of a full quad segment
// and 2 relative quad segments.
// being held for interpolation
// that was last interpolated. This
// is the curve segment ready to be
// returned in the next call to
// currentSegment().
// each curve being held in storage
// was generated.
// levels array of the curve segment
// at the holdIndex
{
}
}
}
}
}
}
public Test7047069() {
levelIndex = 0;
this.limit = 10;
}
/*
* Ensures that the hold array can hold up to (want) more values.
* It is currently holding (hold.length - holdIndex) values.
*/
have);
}
}
private boolean next() {
return false;
}
break;
}
holdIndex -= 4;
// Now that we have subdivided, we have constructed
// two curves of one depth lower than the original
// curve. One of those curves is in the place of
// the former curve and one of them is in the next
// set of held coordinate slots. We now set both
// curves level values to the next higher level.
level++;
levelIndex++;
}
// This curve segment is flat enough, or it is too deep
// in recursion levels to try to flatten any more. The
// two coordinates at holdIndex+4 and holdIndex+5 now
// contain the endpoint of the curve which can be the
// endpoint of an approximating line segment.
holdIndex += 4;
levelIndex--;
return true;
}
for (int i = 0; i < 100000; i++) {
}
}
}