소스 검색

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

tags/pre268419
aclement 15 년 전
부모
커밋
3c4a44d338
3개의 변경된 파일31개의 추가작업 그리고 3개의 파일을 삭제
  1. 19
    0
      tests/bugs164/pr195090.java
  2. 7
    3
      tests/src/org/aspectj/systemtest/ajc164/Ajc164Tests.java
  3. 5
    0
      tests/src/org/aspectj/systemtest/ajc164/ajc164.xml

+ 19
- 0
tests/bugs164/pr195090.java 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

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

Loading…
취소
저장