41629
|
1 |
/*
|
|
2 |
* @test /nodynamiccopyright/
|
|
3 |
* @bug 8026721
|
|
4 |
* @summary Enhance Lambda serialization
|
|
5 |
* Checks that the warning for accessing non public members of a class is fired correctly.
|
|
6 |
* @compile -Xlint:serial -Werror WarnSerializableLambdaTestc.java
|
|
7 |
*/
|
|
8 |
|
|
9 |
import javax.tools.SimpleJavaFileObject;
|
|
10 |
import java.io.Serializable;
|
|
11 |
|
|
12 |
public class WarnSerializableLambdaTestc {
|
|
13 |
public interface SerializableIntf<T> extends Serializable {
|
|
14 |
String get(T o);
|
|
15 |
}
|
|
16 |
|
|
17 |
private void dontWarn() {
|
|
18 |
SerializableIntf<SimpleJavaFileObject> s = SimpleJavaFileObject::getName;
|
|
19 |
}
|
|
20 |
}
|