test/jdk/java/io/Serializable/skippedObjCNFException/Write.java
changeset 58565 baa5969ecf34
parent 47216 71c04702a3d5
equal deleted inserted replaced
58564:218a1a642c6f 58565:baa5969ecf34
     1 /*
     1 /*
     2  * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    41 class A implements Serializable {
    41 class A implements Serializable {
    42     private static final long serialVersionUID = 0L;
    42     private static final long serialVersionUID = 0L;
    43     // all three following fields not present on reading side
    43     // all three following fields not present on reading side
    44     B b = new B();
    44     B b = new B();
    45     C c = new C();
    45     C c = new C();
       
    46     @SuppressWarnings("serial") /* Incorrect declarations are being tested */
    46     Object ca = new Object[] { new C() };
    47     Object ca = new Object[] { new C() };
    47 }
    48 }
    48 
    49 
    49 class B implements Serializable {
    50 class B implements Serializable {
    50     private static final long serialVersionUID = 0L;
    51     private static final long serialVersionUID = 0L;
       
    52     @SuppressWarnings("serial") /* Incorrect declarations are being tested */
    51     Object c = new C();
    53     Object c = new C();
    52 }
    54 }
    53 
    55 
    54 class C implements Serializable {       // class not present on reading side
    56 class C implements Serializable {       // class not present on reading side
    55     private static final long serialVersionUID = 0L;
    57     private static final long serialVersionUID = 0L;