langtools/test/tools/javac/T8029102/WarnSerializableLambdaTest.java
author sogoel
Fri, 29 Aug 2014 00:42:42 -0700
changeset 26274 02a5b23ee21c
parent 24219 e7dc661cafae
permissions -rw-r--r--
8055074: Group 9a: golden files for tests in tools/javac dir Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24219
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
     1
/*
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
     2
 * @test /nodynamiccopyright/
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
     3
 * @bug 8029102
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
     4
 * @summary Enhance compiler warnings for Lambda
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
     5
 *     Checks that the warning for accessing non public members of a class is
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
     6
 *     fired correctly.
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
     7
 * @compile/fail/ref=WarnSerializableLambdaTest.out -XDrawDiagnostics -Werror -XDwarnOnAccessToSensitiveMembers WarnSerializableLambdaTest.java
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
     8
 */
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
     9
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    10
import java.io.Serializable;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    11
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    12
public class WarnSerializableLambdaTest {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    13
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    14
    void warnLambda() throws Exception {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    15
        SAM t3 = (SAM & Serializable)WarnSerializableLambdaTest::packageClassMethod;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    16
        SAM t4 = (SAM & Serializable)WarnSerializableLambdaTest::protectedClassMethod;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    17
        SAM t5 = (SAM & Serializable)WarnSerializableLambdaTest::privateClassMethod;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    18
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    19
        WarnSerializableLambdaTest test = new WarnSerializableLambdaTest();
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    20
        SAM t6 = (SAM & Serializable)test::packageInstanceMethod;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    21
        SAM t7 = (SAM & Serializable)test::protectedInstanceMethod;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    22
        SAM t8 = (SAM & Serializable)test::privateInstanceMethod;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    23
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    24
        SAM t9 = (SAM & Serializable) c -> {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    25
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    26
            WarnSerializableLambdaTest.staticPackageField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    27
            WarnSerializableLambdaTest.staticProtectedField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    28
            WarnSerializableLambdaTest.staticPrivateField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    29
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    30
            packageField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    31
            protectedField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    32
            privateField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    33
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    34
            WarnSerializableLambdaTest.packageClassMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    35
            WarnSerializableLambdaTest.protectedClassMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    36
            WarnSerializableLambdaTest.privateClassMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    37
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    38
            packageInstanceMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    39
            protectedInstanceMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    40
            privateInstanceMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    41
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    42
            PrivateClass.effectivelyNonPublicStaticField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    43
            PrivateClass.effectivelyNonPublicClassMethod();
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    44
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    45
            PrivateClass p = new PrivateClass();
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    46
            p.effectivelyNonPublicInstanceField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    47
            p.effectivelyNonPublicInstanceMethod();
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    48
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    49
            return null;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    50
        };
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    51
    }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    52
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    53
    private void warnAnoInnerClass() throws Exception {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    54
        new SerializableDesc() {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    55
            public void m(Object param) throws Exception {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    56
                WarnSerializableLambdaTest.staticPackageField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    57
                WarnSerializableLambdaTest.staticProtectedField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    58
                WarnSerializableLambdaTest.staticPrivateField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    59
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    60
                packageField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    61
                protectedField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    62
                privateField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    63
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    64
                WarnSerializableLambdaTest.packageClassMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    65
                WarnSerializableLambdaTest.protectedClassMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    66
                WarnSerializableLambdaTest.privateClassMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    67
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    68
                packageInstanceMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    69
                protectedInstanceMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    70
                privateInstanceMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    71
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    72
                PrivateClass.effectivelyNonPublicStaticField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    73
                PrivateClass.effectivelyNonPublicClassMethod();
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    74
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    75
                PrivateClass p = new PrivateClass();
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    76
                p.effectivelyNonPublicInstanceField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    77
                p.effectivelyNonPublicInstanceMethod();
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    78
            }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    79
        };
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    80
    }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    81
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    82
    void dontWarnLambda() throws Exception {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    83
        SAM t1 = (SAM & Serializable)WarnSerializableLambdaTest::publicClassMethod;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    84
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    85
        WarnSerializableLambdaTest test = new WarnSerializableLambdaTest();
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    86
        SAM t2 = (SAM & Serializable)test::publicInstanceMethod;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    87
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    88
        int[] buffer = {0};
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    89
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    90
        SAM t3 = (SAM & Serializable) param -> {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    91
            Object localVar;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    92
            localVar = null;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    93
            param = null;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    94
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    95
            WarnSerializableLambdaTest.staticPublicField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    96
            publicField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    97
            WarnSerializableLambdaTest.publicClassMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    98
            publicInstanceMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
    99
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   100
            PublicClass.effectivelyPublicStaticField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   101
            PublicClass.effectivelyPublicClassMethod();
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   102
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   103
            PublicClass p = new PublicClass();
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   104
            p.effectivelyPublicInstanceField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   105
            p.effectivelyPublicInstanceMethod();
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   106
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   107
            int l = buffer.length;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   108
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   109
            return null;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   110
        };
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   111
    }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   112
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   113
    private void dontWarnAnoInnerClass() throws Exception {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   114
        final int[] buffer = {0};
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   115
        new SerializableDesc() {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   116
            public void m(Object param) throws Exception {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   117
                Object localVar;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   118
                localVar = null;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   119
                param = null;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   120
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   121
                WarnSerializableLambdaTest.staticPublicField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   122
                publicField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   123
                WarnSerializableLambdaTest.publicClassMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   124
                publicInstanceMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   125
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   126
                PublicClass.effectivelyPublicStaticField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   127
                PublicClass.effectivelyPublicClassMethod();
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   128
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   129
                PublicClass p = new PublicClass();
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   130
                p.effectivelyPublicInstanceField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   131
                p.effectivelyPublicInstanceMethod();
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   132
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   133
                int l = buffer.length;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   134
            }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   135
        };
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   136
    }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   137
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   138
    enum WarnEnum {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   139
        A {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   140
            public void m() throws Exception {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   141
                WarnSerializableLambdaTest.staticPackageField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   142
                WarnSerializableLambdaTest.staticProtectedField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   143
                WarnSerializableLambdaTest.staticPrivateField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   144
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   145
                WarnSerializableLambdaTest test =
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   146
                        new WarnSerializableLambdaTest();
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   147
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   148
                test.packageField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   149
                test.protectedField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   150
                test.privateField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   151
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   152
                WarnSerializableLambdaTest.packageClassMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   153
                WarnSerializableLambdaTest.protectedClassMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   154
                WarnSerializableLambdaTest.privateClassMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   155
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   156
                test.packageInstanceMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   157
                test.protectedInstanceMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   158
                test.privateInstanceMethod(null);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   159
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   160
                PrivateClass.effectivelyNonPublicStaticField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   161
                PrivateClass.effectivelyNonPublicClassMethod();
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   162
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   163
                PrivateClass p = new PrivateClass();
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   164
                p.effectivelyNonPublicInstanceField = "";
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   165
                p.effectivelyNonPublicInstanceMethod();
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   166
            }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   167
        };
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   168
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   169
        public void m() throws Exception {}
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   170
    }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   171
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   172
    static String staticPackageField;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   173
    static private String staticPrivateField;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   174
    static protected String staticProtectedField;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   175
    static public String staticPublicField;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   176
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   177
    String packageField;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   178
    private String privateField;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   179
    protected String protectedField;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   180
    public String publicField;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   181
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   182
    static Object packageClassMethod(String s) {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   183
        return null;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   184
    }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   185
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   186
    static private Object privateClassMethod(String s) {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   187
        return null;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   188
    }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   189
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   190
    static protected Object protectedClassMethod(String s) {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   191
        return null;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   192
    }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   193
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   194
    static public Object publicClassMethod(String s) {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   195
        return null;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   196
    }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   197
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   198
    Object packageInstanceMethod(String s) {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   199
        return null;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   200
    }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   201
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   202
    protected Object protectedInstanceMethod(String s) {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   203
        return null;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   204
    }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   205
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   206
    private Object privateInstanceMethod(String s) {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   207
        return null;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   208
    }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   209
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   210
    public Object publicInstanceMethod(String s) {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   211
        return null;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   212
    }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   213
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   214
    interface SAM {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   215
        Object apply(String s) throws Exception;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   216
    }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   217
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   218
    interface SAM2 {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   219
        Object apply(String arg1, String arg2);
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   220
    }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   221
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   222
    class SerializableDesc implements Serializable {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   223
        public void m(Object param) throws Exception {}
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   224
    }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   225
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   226
    static private class PrivateClass {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   227
        static public String effectivelyNonPublicStaticField;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   228
        public String effectivelyNonPublicInstanceField;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   229
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   230
        static public void effectivelyNonPublicClassMethod() {}
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   231
        public void effectivelyNonPublicInstanceMethod() {}
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   232
    }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   233
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   234
    static public class PublicClass {
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   235
        static public String effectivelyPublicStaticField;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   236
        public String effectivelyPublicInstanceField;
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   237
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   238
        static public void effectivelyPublicClassMethod() {}
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   239
        public void effectivelyPublicInstanceMethod() {}
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   240
    }
e7dc661cafae 8029102: Enhance compiler warnings for Lambda
vromero
parents:
diff changeset
   241
}