diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-10-10 22:36:16 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-10-10 23:25:09 +0200 |
commit | a9b4fb0c685fbc52079d57532c04277e78c95ec2 (patch) | |
tree | 0be3466295af6b87b1af63acc675749786196f07 /test/transform/resource/after-ecj | |
parent | 08961edcfeef9b181621351e36bbc267f9395415 (diff) | |
download | lombok-a9b4fb0c685fbc52079d57532c04277e78c95ec2.tar.gz lombok-a9b4fb0c685fbc52079d57532c04277e78c95ec2.tar.bz2 lombok-a9b4fb0c685fbc52079d57532c04277e78c95ec2.zip |
Fix for issues when mixing @NonNull on params with @SneakyThrows or @Synchronized [Issue #588]
Diffstat (limited to 'test/transform/resource/after-ecj')
-rw-r--r-- | test/transform/resource/after-ecj/InjectField.java | 4 | ||||
-rw-r--r-- | test/transform/resource/after-ecj/NonNullWithSneakyThrows.java | 18 |
2 files changed, 20 insertions, 2 deletions
diff --git a/test/transform/resource/after-ecj/InjectField.java b/test/transform/resource/after-ecj/InjectField.java index 83d9e5fa..f9ea9142 100644 --- a/test/transform/resource/after-ecj/InjectField.java +++ b/test/transform/resource/after-ecj/InjectField.java @@ -4,9 +4,9 @@ import lombok.Synchronized; @Log enum InjectField1 { A(), B(), + private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(InjectField1.class.getName()); private final java.lang.Object $lock = new java.lang.Object[0]; private static final java.lang.Object $LOCK = new java.lang.Object[0]; - private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(InjectField1.class.getName()); private static final String LOG_MESSAGE = "static initializer"; private String fieldA; static { @@ -32,8 +32,8 @@ import lombok.Synchronized; } } @Log class InjectField2 { - private final java.lang.Object $lock = new java.lang.Object[0]; private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(InjectField2.class.getName()); + private final java.lang.Object $lock = new java.lang.Object[0]; private static final String LOG_MESSAGE = "static initializer"; static { log.log(Level.FINE, LOG_MESSAGE); diff --git a/test/transform/resource/after-ecj/NonNullWithSneakyThrows.java b/test/transform/resource/after-ecj/NonNullWithSneakyThrows.java new file mode 100644 index 00000000..fac8dcdd --- /dev/null +++ b/test/transform/resource/after-ecj/NonNullWithSneakyThrows.java @@ -0,0 +1,18 @@ +class NonNullWithSneakyThrows { + NonNullWithSneakyThrows() { + super(); + } + @lombok.SneakyThrows void test(@lombok.NonNull String in) { + try + { + if ((in == null)) + { + throw new java.lang.NullPointerException("in"); + } + System.out.println(in); + } + catch (final java.lang.Throwable $ex) { + throw lombok.Lombok.sneakyThrow($ex); + } + } +}
\ No newline at end of file |