--- /dev/null
+import java.lang.reflect.Method;
+
+public class Basic {
+ public static void main(String[] args) {
+ Method[] ms = X.class.getMethods();
+ for (int i = 0; i < ms.length; i++) {
+ if (ms[i].getName().indexOf("if$")!=-1) {
+ System.out.println("if method: "+ms[i]);
+ }
+ }
+}
+ public void m() {}
+}
+
+aspect X {
+ before(): execution(* m(..)) && if(true==true) && if(true==(true || true)) {
+ }
+ before(): execution(* m(..)) && if(true==true) {
+ }
+}
--- /dev/null
+import java.lang.reflect.Method;
+
+public class Basic2 {
+
+ public static void main(String[] args) {
+ Method[] ms = X.class.getMethods();
+ for (int i = 0; i < ms.length; i++) {
+ if (ms[i].getName().indexOf("if$")!=-1) {
+ System.out.println("if method: "+ms[i]);
+ }
+ }
+}
+ public void m() {}
+}
+
+aspect X {
+ pointcut p(): execution(* m(..)) && if(true==true) && if(true==(true || true));
+ pointcut q(): execution(* m(..)) && if(true==true);
+
+}
public class Ajc165Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ public void testIfNames_pr277508() {
+ runTest("if method names");
+ }
+
+ public void testIfNames_pr277508_2() {
+ runTest("if method names - 2");
+ }
+
public void testDecAnnoMethod_pr275625() {
runTest("dec anno method");
}
<suite>
+ <ajc-test dir="bugs165/pr277508" title="if method names">
+ <compile files="Basic.java" options="-1.5"/>
+ <run class="Basic">
+ <stdout>
+ <line text="if method: public static final boolean X.ajc$if$1ba()"/>
+ <line text="if method: public static final boolean X.ajc$if$177()"/>
+ <line text="if method: public static final boolean X.ajc$if$165()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs165/pr277508" title="if method names - 2">
+ <compile files="Basic2.java" options="-1.5"/>
+ <run class="Basic2">
+ <stdout>
+ <line text="if method: public static final boolean X.ajc$if$16d()"/>
+ <line text="if method: public static final boolean X.ajc$if$17f()"/>
+ <line text="if method: public static final boolean X.ajc$if$1c0()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
<ajc-test dir="bugs165/pr275625" title="dec anno method">
<compile files="A.java" options="-1.5"/>
</ajc-test>