test/jdk/java/io/Serializable/fieldTypeString/Write.java
changeset 58565 baa5969ecf34
parent 47216 71c04702a3d5
--- a/test/jdk/java/io/Serializable/fieldTypeString/Write.java	Fri Oct 11 09:43:41 2019 -0700
+++ b/test/jdk/java/io/Serializable/fieldTypeString/Write.java	Fri Oct 11 13:11:56 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 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,6 +42,7 @@
 
 class Foo implements Serializable {
     private static final long serialVersionUID = 0L;
+    @SuppressWarnings("serial") /* Incorrect declarations are being tested */
     Object obj;
 
     Foo(Object obj) {
@@ -59,7 +60,7 @@
         ObjectOutputStream oout =
             new ObjectOutputStream(new FileOutputStream("foo.ser"));
         oout.writeObject(new Foo("foo"));
-        oout.writeObject(new Foo(new Integer(0)));
+        oout.writeObject(new Foo(0));
         oout.close();
 
         oout = new ObjectOutputStream(new FileOutputStream("bar.ser"));