Arrays.copyOf does not work with value type arrays

Tobias Hartmann tobias.hartmann at
Wed Mar 15 14:51:31 UTC 2017


I'm looking into C2 intrinsic support for value types and noticed that below code fails with:

Exception in thread "main" java.lang.BootstrapMethodError: call site initialization exception
	at java.lang.invoke.CallSite.makeSite(
	at java.lang.invoke.MethodHandleNatives.linkCallSiteImpl(
	at java.lang.invoke.MethodHandleNatives.linkCallSite(
	at Test.main(
Caused by: java.lang.ClassNotFoundException: java/util/Arrays$copyOf$433071630$${QPoint;}
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(
	at java.lang.invoke.GenericStaticDispatch.metafactory(
	at java.lang.invoke.CallSite.makeSite(
	... 3 more

Is this supposed to work with MVT1.0?


import java.util.Arrays;

__ByValue final class Point {
    final int x;
    final int y;

    private Point(int x, int y) {
        this.x = x;
        this.y = y;

    public static Point createPoint(int x, int y) {
        return __Make Point(x, y);

public class Test {

  public static void main(String[] args) {
    Point[] src = new Point[10];
    Point[] dst = Arrays.copyOf(src, 10);


More information about the valhalla-dev mailing list