From 9806e5cca4b449159ad0509dafde81951b8a8523 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 22 Dec 2020 05:19:41 +0100 Subject: [fixes #2681] [jdk16] support jdk16 --- src/utils/lombok/permit/dummy/Child.java | 9 +++++++++ src/utils/lombok/permit/dummy/GrandChild.java | 19 +++++++++++++++++++ src/utils/lombok/permit/dummy/Parent.java | 12 ++++++++++++ src/utils/lombok/permit/dummy/package-info.java | 8 ++++++++ 4 files changed, 48 insertions(+) create mode 100644 src/utils/lombok/permit/dummy/Child.java create mode 100644 src/utils/lombok/permit/dummy/GrandChild.java create mode 100644 src/utils/lombok/permit/dummy/Parent.java create mode 100644 src/utils/lombok/permit/dummy/package-info.java (limited to 'src/utils/lombok/permit/dummy') diff --git a/src/utils/lombok/permit/dummy/Child.java b/src/utils/lombok/permit/dummy/Child.java new file mode 100644 index 00000000..c189ee37 --- /dev/null +++ b/src/utils/lombok/permit/dummy/Child.java @@ -0,0 +1,9 @@ +package lombok.permit.dummy; + +@SuppressWarnings("all") +public abstract class Child extends Parent { + private transient volatile boolean foo; + private transient volatile Object[] bar; + private transient volatile Object baz; + +} diff --git a/src/utils/lombok/permit/dummy/GrandChild.java b/src/utils/lombok/permit/dummy/GrandChild.java new file mode 100644 index 00000000..ef182aa7 --- /dev/null +++ b/src/utils/lombok/permit/dummy/GrandChild.java @@ -0,0 +1,19 @@ +package lombok.permit.dummy; + +@SuppressWarnings("all") +public final class GrandChild extends Child { + private Class a; + private int b; + private String c; + private Class d; + private Class[] e; + private Class[] f; + private int g; + private transient String h; + private transient Object i; + private byte[] j; + private byte[] k; + private byte[] l; + private volatile Object m; + private Object n; +} diff --git a/src/utils/lombok/permit/dummy/Parent.java b/src/utils/lombok/permit/dummy/Parent.java new file mode 100644 index 00000000..33928aeb --- /dev/null +++ b/src/utils/lombok/permit/dummy/Parent.java @@ -0,0 +1,12 @@ +package lombok.permit.dummy; + +import java.io.OutputStream; + +@SuppressWarnings("all") +public class Parent { + boolean first; + static final Object staticObj = OutputStream.class; + volatile Object second; + private static volatile boolean staticSecond; + private static volatile boolean staticThird; +} diff --git a/src/utils/lombok/permit/dummy/package-info.java b/src/utils/lombok/permit/dummy/package-info.java new file mode 100644 index 00000000..87ca839a --- /dev/null +++ b/src/utils/lombok/permit/dummy/package-info.java @@ -0,0 +1,8 @@ +/** + * This package recreates the type hierarchy of {@code java.lang.reflect.AccessibleObject} and friends (such as {@code java.lang.reflect.Method}); + * its purpose is to allow us to ask {@code sun.misc.internal.Unsafe} about the exact offset of the {@code override} field of {@code AccessibleObject}; + * asking about that field directly doesn't work after jdk14, presumably because the fields of AO are expressly hidden somehow. + * + * NB: It's usually 12, on the vast majority of OS, VM, and architecture combos. + */ +package lombok.permit.dummy; -- cgit