author | vromero |
Thu, 04 Jul 2013 10:41:08 +0100 | |
changeset 18899 | 2557b27d1f1c |
permissions | -rw-r--r-- |
18899
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
1 |
/* |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
2 |
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
4 |
* |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
8 |
* |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
13 |
* accompanied this code). |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
14 |
* |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
18 |
* |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
21 |
* questions. |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
22 |
*/ |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
23 |
|
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
24 |
/* |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
25 |
* @test |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
26 |
* @bug 6356530 |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
27 |
* @summary -Xlint:serial does not flag abstract classes with concrete methods/members |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
28 |
* @compile/fail/ref=SerializableAbstractClassWithNonAbstractMethodsTest.out -XDrawDiagnostics -Werror -Xlint:serial SerializableAbstractClassWithNonAbstractMethodsTest.java |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
29 |
*/ |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
30 |
|
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
31 |
abstract class SerializableAbstractClassWithNonAbstractMethodsTest implements java.io.Serializable { |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
32 |
void m1() {} |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
33 |
abstract void m2(); |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
34 |
|
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
35 |
abstract class AWithUID implements java.io.Serializable { |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
36 |
private static final long serialVersionUID = 0; |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
37 |
void m(){} |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
38 |
} |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
39 |
|
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
40 |
interface IDefault extends java.io.Serializable { |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
41 |
default int m() { return 1; } |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
42 |
} |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
43 |
|
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
44 |
interface IDefaultAndUID extends java.io.Serializable { |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
45 |
static final long serialVersionUID = 0; |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
46 |
default int m() { return 1; } |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
47 |
} |
2557b27d1f1c
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
vromero
parents:
diff
changeset
|
48 |
} |