--- a/test/jdk/java/io/Serializable/resolveClass/consTest/ConsTest.java Fri Oct 11 09:43:41 2019 -0700
+++ b/test/jdk/java/io/Serializable/resolveClass/consTest/ConsTest.java Fri Oct 11 13:11:56 2019 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2019, 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
@@ -42,9 +42,10 @@
import jdk.test.lib.util.JarUtils;
public class ConsTest implements Serializable {
+ private static final long serialVersionUID = 1L;
+
public static void main(String[] args) throws Exception {
- Constructor cons = Boot.class.getConstructor(
- new Class[] { ObjectInputStream.class });
+ Constructor<?> cons = Boot.class.getConstructor(ObjectInputStream.class);
ByteArrayOutputStream bout = new ByteArrayOutputStream();
ObjectOutputStream oout = new ObjectOutputStream(bout);
oout.writeObject(new ConsTest());
@@ -53,7 +54,7 @@
for (int i = 0; i < 100; i++) {
ObjectInputStream oin = new ObjectInputStream(
new ByteArrayInputStream(bout.toByteArray()));
- cons.newInstance(new Object[]{ oin });
+ cons.newInstance(oin);
}
}
}