--- a/test/jdk/java/io/Serializable/classDescHooks/ClassDescHooks.java Fri Oct 11 09:43:41 2019 -0700
+++ b/test/jdk/java/io/Serializable/classDescHooks/ClassDescHooks.java Fri Oct 11 13:11:56 2019 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -32,9 +32,9 @@
class Foo implements Serializable {
private static final long serialVersionUID = 1L;
- Short s = new Short((short) 1);
- Integer i = new Integer(2);
- Long l = new Long(3);
+ Short s = (short) 1;
+ Integer i = 2;
+ Long l = 3L;
public boolean equals(Object obj) {
if (obj instanceof Foo) {
@@ -43,6 +43,10 @@
}
return false;
}
+
+ public int hashCode() {
+ return i;
+ }
}
class CustomOutputStream extends ObjectOutputStream {