<compile files="common/org/aspectj/langlib/Pointcuts.java,
testsrc/org/aspectj/langlib/PointcutsCW.java">
- <message kind="warning" line="159" text="anyConstructorExecution" file="Pointcuts.java"/>
+ <message kind="warning" line="172" text="anyConstructorExecution" file="Pointcuts.java"/>
<message kind="warning" line="20" text="anyConstructorExecution"/>
<message kind="warning" line="20" text="anyPublicConstructorExecution"/>
<message kind="warning" line="173" text="anySystemProcessSpawningCalls"/>
<message kind="warning" line="177" text="mostThrowableReadCalls"/>
<message kind="warning" line="179" text="mostThrowableReadCalls"/>
- <message kind="warning" line="190" text="anyConstructorExecution"/>
- <message kind="warning" line="190" text="anyNonPrivateConstructorExecution"/>
- </compile>
+ <message kind="warning" line="184" text="anyCollectionWriteCalls"/>
+ <message kind="warning" line="187" text="anyCollectionWriteCalls"/>
+ <message kind="warning" line="189" text="anyCollectionWriteCalls"/>
+ <message kind="warning" line="189" text="anyNonPrivateFieldGet"/>
+ <message kind="warning" line="189" text="anyPublicFieldGet"/>
+ <message kind="warning" line="191" text="anyCollectionWriteCalls"/>
+ <message kind="warning" line="201" text="anyConstructorExecution"/>
+ <message kind="warning" line="201" text="anyNonPrivateConstructorExecution"/>
+ </compile>
<run class="org.aspectj.langlib.PointcutsCW"/>
</ajc-test>
import java.beans.PropertyChangeListener;
import java.io.*;
import java.lang.reflect.Method;
-
+import java.util.*;
import javax.swing.*;
import javax.swing.Action;
declare warning: Pointcuts.anySystemProcessSpawningCalls() : "anySystemProcessSpawningCalls";
declare warning: Pointcuts.mostThrowableReadCalls() : "mostThrowableReadCalls";
declare warning: Pointcuts.exceptionWrappingCalls() : "exceptionWrappingCalls";
-
+ declare warning: Pointcuts.anyCollectionWriteCalls() : "anyCollectionWriteCalls";
// CW anyMethodExecution, anyPublicMethodExecution, anyNonPrivateMethodExecution
public static void main(String[] list) {
new MemberTests(0).toString(); // RT cflowMainExecution
e.getClass(); // not mostThrowableReadCalls b/c getClass() is Object
+ List list = new ArrayList();
+ list.add("one"); // CW anyCollectionWriteCalls
+
+ // actually not writing, but staticly might
+ list.remove("two"); // CW anyCollectionWriteCalls
+
+ list.removeAll(Collections.EMPTY_LIST); // CW anyCollectionWriteCalls, anyPublicFieldGet, anyNonPrivateFieldGet
+
+ list.retainAll(list); // CW anyCollectionWriteCalls
+
}
}
+
aspect DynamicTests {
DynamicTests() {
int i = 1; // CW anyConstructorExecution, anyNonPrivateConstructorExecution XXX shows as 190, not 189?