Browse Source

Fix 486203: NPE in IntelliJ since 1.8.7

tags/V1_8_9
Andy Clement 8 years ago
parent
commit
448dc83571

BIN
org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip View File


BIN
org.eclipse.jdt.core/jdtcore-for-aspectj.jar View File


+ 14
- 0
tests/bugs189/486203/While.java View File

@@ -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) {
}
}

+ 6
- 4
tests/src/org/aspectj/systemtest/AllTests18.java View File

@@ -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());

+ 39
- 0
tests/src/org/aspectj/systemtest/ajc189/Ajc189Tests.java View File

@@ -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");
}

}

+ 26
- 0
tests/src/org/aspectj/systemtest/ajc189/AllTestsAspectJ189.java View File

@@ -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;
}
}

+ 9
- 0
tests/src/org/aspectj/systemtest/ajc189/ajc189.xml View File

@@ -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>

Loading…
Cancel
Save