]> source.dussan.org Git - aspectj.git/commitdiff
Fix 486203: NPE in IntelliJ since 1.8.7
authorAndy Clement <aclement@pivotal.io>
Tue, 19 Jan 2016 00:08:03 +0000 (16:08 -0800)
committerAndy Clement <aclement@pivotal.io>
Tue, 19 Jan 2016 00:08:03 +0000 (16:08 -0800)
org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip
org.eclipse.jdt.core/jdtcore-for-aspectj.jar
tests/bugs189/486203/While.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/AllTests18.java
tests/src/org/aspectj/systemtest/ajc189/Ajc189Tests.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc189/AllTestsAspectJ189.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc189/ajc189.xml [new file with mode: 0644]

index 244c9b589f90e9bde2d97b0ffcc9c4244549c6c6..8b6a18cb1fc1ef1717049df619d3ef14b210e2f7 100644 (file)
Binary files a/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip and b/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip differ
index 5fcb28e3473c7fdc2e6bfd9e2d88e2d1f7040aa3..24913c717a4a4bb8b5de60ce5cce60d47ec77920 100644 (file)
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 (file)
index 0000000..f41e74a
--- /dev/null
@@ -0,0 +1,14 @@
+import java.util.function.Consumer;
+
+class While {
+       void m() {
+               t(Long.class, value -> {
+                       int x = 1;
+                       while (--x >= 0)
+                               ;
+               });
+       }
+
+       <T> void t(Class<T> clazz, Consumer<T> object) {
+       }
+}
index 030bcfd45378749becfa47f09d18d6f4d5907711..a5382792b88542992e60bc155a38d62eff757af9 100644 (file)
  *******************************************************************************/
 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 (file)
index 0000000..ac3ceb9
--- /dev/null
@@ -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 (file)
index 0000000..0ccf75c
--- /dev/null
@@ -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 (file)
index 0000000..f64438a
--- /dev/null
@@ -0,0 +1,9 @@
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
+
+<suite>
+
+<ajc-test dir="bugs189/486203" title="while npe">
+<compile files="While.java" options="-1.8"/>
+</ajc-test>
+
+</suite>