From 72b55dccb18f38b8aefd0ac8e7c2e8bd2dd5c057 Mon Sep 17 00:00:00 2001 From: Sander Koning Date: Fri, 20 Sep 2013 17:13:39 +0200 Subject: Issue 559: NullPointerException when @NonNull is used in abstract method - Prevent NPE in javac and give a proper warning in both eclipse and javac - Add test cases --- .../resource/after-ecj/NonNullOnParameterAbstract.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/transform/resource/after-ecj/NonNullOnParameterAbstract.java (limited to 'test/transform/resource/after-ecj/NonNullOnParameterAbstract.java') diff --git a/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java b/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java new file mode 100644 index 00000000..a7dae247 --- /dev/null +++ b/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java @@ -0,0 +1,13 @@ +abstract class NonNullOnParameterAbstract { + NonNullOnParameterAbstract() { + super(); + } + public void test(@lombok.NonNull String arg) { + if ((arg == null)) + { + throw new java.lang.NullPointerException("arg"); + } + System.out.println("Hey"); + } + public abstract void test2(@lombok.NonNull String arg); +} \ No newline at end of file -- cgit