test/jdk/java/io/Serializable/readObjectNoData/Read.java
changeset 58565 baa5969ecf34
parent 47216 71c04702a3d5
equal deleted inserted replaced
58564:218a1a642c6f 58565:baa5969ecf34
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2010, 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.
    46  * readObjectNoData should not get called.
    46  * readObjectNoData should not get called.
    47  */
    47  */
    48 class B extends A implements Serializable {
    48 class B extends A implements Serializable {
    49     private static final long serialVersionUID = 0L;
    49     private static final long serialVersionUID = 0L;
    50     boolean bCalled = false;
    50     boolean bCalled = false;
       
    51     @SuppressWarnings("serial") /* Incorrect declarations are being tested */
    51     private void readObjectNoData(int wrong) throws ObjectStreamException {
    52     private void readObjectNoData(int wrong) throws ObjectStreamException {
    52         bCalled = true;
    53         bCalled = true;
    53     }
    54     }
    54 }
    55 }
    55 
    56 
    80  * readObjectNoData should not get called.
    81  * readObjectNoData should not get called.
    81  */
    82  */
    82 class E extends D {
    83 class E extends D {
    83     private static final long serialVersionUID = 0L;
    84     private static final long serialVersionUID = 0L;
    84     boolean eCalled = false;
    85     boolean eCalled = false;
       
    86     @SuppressWarnings("serial") /* Incorrect declarations are being tested */
    85     void readObjectNoData() throws ObjectStreamException {
    87     void readObjectNoData() throws ObjectStreamException {
    86         eCalled = true;
    88         eCalled = true;
    87     }
    89     }
    88 }
    90 }
    89 
    91