From: Andy Clement Date: Tue, 19 Jan 2016 00:08:03 +0000 (-0800) Subject: Fix 486203: NPE in IntelliJ since 1.8.7 X-Git-Tag: V1_8_9~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=448dc83571dc16c8b087e2d5e2242474c02ff819;p=aspectj.git Fix 486203: NPE in IntelliJ since 1.8.7 --- diff --git a/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip b/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip index 244c9b589..8b6a18cb1 100644 Binary files a/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip and b/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip differ diff --git a/org.eclipse.jdt.core/jdtcore-for-aspectj.jar b/org.eclipse.jdt.core/jdtcore-for-aspectj.jar index 5fcb28e34..24913c717 100644 Binary files a/org.eclipse.jdt.core/jdtcore-for-aspectj.jar and b/org.eclipse.jdt.core/jdtcore-for-aspectj.jar differ diff --git a/tests/bugs189/486203/While.java b/tests/bugs189/486203/While.java new file mode 100644 index 000000000..f41e74aa8 --- /dev/null +++ b/tests/bugs189/486203/While.java @@ -0,0 +1,14 @@ +import java.util.function.Consumer; + +class While { + void m() { + t(Long.class, value -> { + int x = 1; + while (--x >= 0) + ; + }); + } + + void t(Class clazz, Consumer object) { + } +} diff --git a/tests/src/org/aspectj/systemtest/AllTests18.java b/tests/src/org/aspectj/systemtest/AllTests18.java index 030bcfd45..a5382792b 100644 --- a/tests/src/org/aspectj/systemtest/AllTests18.java +++ b/tests/src/org/aspectj/systemtest/AllTests18.java @@ -10,24 +10,26 @@ *******************************************************************************/ package org.aspectj.systemtest; -import junit.framework.Test; -import junit.framework.TestSuite; - import org.aspectj.systemtest.ajc180.AllTestsAspectJ180; import org.aspectj.systemtest.ajc181.AllTestsAspectJ181; -import org.aspectj.systemtest.ajc182.AllTestsAspectJ182; +import org.aspectj.systemtest.ajc182.AllTestsAspectJ182; import org.aspectj.systemtest.ajc183.AllTestsAspectJ183; import org.aspectj.systemtest.ajc184.AllTestsAspectJ184; import org.aspectj.systemtest.ajc185.AllTestsAspectJ185; import org.aspectj.systemtest.ajc186.AllTestsAspectJ186; import org.aspectj.systemtest.ajc187.AllTestsAspectJ187; import org.aspectj.systemtest.ajc188.AllTestsAspectJ188; +import org.aspectj.systemtest.ajc189.AllTestsAspectJ189; + +import junit.framework.Test; +import junit.framework.TestSuite; public class AllTests18 { public static Test suite() { TestSuite suite = new TestSuite("AspectJ System Test Suite - 1.8"); // $JUnit-BEGIN$ + suite.addTest(AllTestsAspectJ189.suite()); suite.addTest(AllTestsAspectJ188.suite()); suite.addTest(AllTestsAspectJ187.suite()); suite.addTest(AllTestsAspectJ186.suite()); diff --git a/tests/src/org/aspectj/systemtest/ajc189/Ajc189Tests.java b/tests/src/org/aspectj/systemtest/ajc189/Ajc189Tests.java new file mode 100644 index 000000000..ac3ceb984 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc189/Ajc189Tests.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2016 Contributors + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Andy Clement - initial API and implementation + *******************************************************************************/ +package org.aspectj.systemtest.ajc189; + +import java.io.File; + +import junit.framework.Test; + +import org.aspectj.testing.XMLBasedAjcTestCase; + +/** + * @author Andy Clement + */ +public class Ajc189Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public void testWhileNPE_486203() throws Exception { + runTest("while npe"); + } + + // --- + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(Ajc189Tests.class); + } + + @Override + protected File getSpecFile() { + return getClassResource("ajc189.xml"); + } + +} diff --git a/tests/src/org/aspectj/systemtest/ajc189/AllTestsAspectJ189.java b/tests/src/org/aspectj/systemtest/ajc189/AllTestsAspectJ189.java new file mode 100644 index 000000000..0ccf75cf2 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc189/AllTestsAspectJ189.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 2016 Contributors + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Andy Clement - initial API and implementation + *******************************************************************************/ +package org.aspectj.systemtest.ajc189; + +import junit.framework.Test; +import junit.framework.TestSuite; +import org.aspectj.systemtest.apt.AptTests; + +public class AllTestsAspectJ189 { + + public static Test suite() { + TestSuite suite = new TestSuite("AspectJ 1.8.9 tests"); + // $JUnit-BEGIN$ + suite.addTest(Ajc189Tests.suite()); + // $JUnit-END$ + return suite; + } +} diff --git a/tests/src/org/aspectj/systemtest/ajc189/ajc189.xml b/tests/src/org/aspectj/systemtest/ajc189/ajc189.xml new file mode 100644 index 000000000..f64438a25 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc189/ajc189.xml @@ -0,0 +1,9 @@ + + + + + + + + +