Bläddra i källkod

195090: ajc$ local vars that aren't used getting reported when using -warn:+unusedArgument

tags/pre268419
aclement 15 år sedan
förälder
incheckning
3c4a44d338

+ 19
- 0
tests/bugs164/pr195090.java Visa fil

@@ -0,0 +1,19 @@
/**
* Helper interface.
*/
interface Interface{
boolean methodToBeImplemented();
}

/**
* Exposes the ajc$this_ is never read warning.
*/
public aspect pr195090 {
public boolean Interface.methodToBeImplemented() {
return returnTrue();
}

public static boolean returnTrue() {
return true;
}
}

+ 7
- 3
tests/src/org/aspectj/systemtest/ajc164/Ajc164Tests.java Visa fil

@@ -24,13 +24,17 @@ import org.aspectj.testing.XMLBasedAjcTestCase;

public class Ajc164Tests extends org.aspectj.testing.XMLBasedAjcTestCase {

public void testAjcThisNotRead() {
runTest("ajcthis not read");
}

public void testRecursiveCflow() {
runTest("recursive cflow");
}

//public void testAopConfig1() {
// runTest("aop config - 1");
//}
// public void testAopConfig1() {
// runTest("aop config - 1");
// }

public void testAnnoDecprecedence_pr256779() {
runTest("anno decprecedence");

+ 5
- 0
tests/src/org/aspectj/systemtest/ajc164/ajc164.xml Visa fil

@@ -8,6 +8,11 @@
</compile>
</ajc-test>
<ajc-test dir="bugs164" title="ajcthis not read">
<compile files="pr195090.java" options="-1.5 -warn:+unusedArgument">
</compile>
</ajc-test>
<ajc-test dir="bugs164/pr256779" title="anno decprecedence">
<compile files="ThisAspect.java OtherAspect.java" options="-1.5"/>
<run class="com.ThisAspect" ltw="aop.xml"/>

Laddar…
Avbryt
Spara