test/jdk/java/io/Serializable/oldTests/ValidateClass.java
changeset 58565 baa5969ecf34
parent 47216 71c04702a3d5
--- a/test/jdk/java/io/Serializable/oldTests/ValidateClass.java	Fri Oct 11 09:43:41 2019 -0700
+++ b/test/jdk/java/io/Serializable/oldTests/ValidateClass.java	Fri Oct 11 13:11:56 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -64,7 +64,7 @@
             Validator vc_u;
 
             vc_u = (Validator)q.readObject();
-            if (vc_u.validated != Integer.MIN_VALUE) {
+            if (Validator.validated != Integer.MIN_VALUE) {
                 System.err.println("\nTEST FAILED: Validation callbacks did " +
                     "not complete.");
                 throw new Error();
@@ -80,6 +80,7 @@
 }
 
 class MissingWriterClass implements java.io.Serializable {
+    private static final long serialVersionUID = 1L;
     int i = 77;
 
     private void writeObject(ObjectOutputStream pw) throws IOException {
@@ -88,6 +89,7 @@
 }
 
 class MissingReaderClass implements java.io.Serializable {
+    private static final long serialVersionUID = 1L;
     int i = 77;
 
     private void readObject(ObjectInputStream pr) throws IOException {
@@ -97,6 +99,8 @@
 
 
 class Validator implements ObjectInputValidation, java.io.Serializable  {
+    private static final long serialVersionUID = 1L;
+
     static int validated = Integer.MAX_VALUE; // Last value validated
     int priority;
     Validator next = null;