--- /dev/null
+public class TestLib {
+
+ public static void main(String[] args) {
+ System.err.println("obtaining five, got "+new TestLib().getFive());
+ }
+
+ public int getFive() { return 5; }
+}
\ No newline at end of file
--- /dev/null
+public class TestLib2 {
+
+ public static void main(String[] args) {
+ System.err.println("obtaining five, got "+new TestLib2().getFive());
+ }
+
+ public Integer getFive() { return new Integer(5); }
+}
\ No newline at end of file
--- /dev/null
+public aspect ThreadAspectLib {
+// pointcut setThreadLocalsField(): set(private int TestLib.myInt);
+//
+// Integer around():setThreadLocalsField()
+// {
+// try{
+// return new Integer(2);
+// }
+// catch(Exception e)
+// {
+// e.printStackTrace();
+// return null;
+// }
+// }
+
+ Integer around(): call(* getFive()) {
+ return new Integer(3);
+ }
+}
\ No newline at end of file
--- /dev/null
+public aspect ThreadAspectLib2 {
+// pointcut setThreadLocalsField(): set(private int TestLib.myInt);
+//
+// Integer around():setThreadLocalsField()
+// {
+// try{
+// return new Integer(2);
+// }
+// catch(Exception e)
+// {
+// e.printStackTrace();
+// return null;
+// }
+// }
+
+ int around(): call(* getFive()) {
+ return 3;
+ }
+}
\ No newline at end of file
return new File("../tests/src/org/aspectj/systemtest/ajc150/ajc150.xml");
}
- // public void testGenericPTW_pr119539_1() { runTest("generic pertypewithin aspect - 1");}
+ //public void testGenericPTW_pr119539_1() { runTest("generic pertypewithin aspect - 1");}
//public void testGenericPTW_pr119539_2() { runTest("generic pertypewithin aspect - 2");}
//public void testGenericPTW_pr119539_3() { runTest("generic pertypewithin aspect - 3");}
/*
public void testFieldGet_pr114343_2() { runTest("field-get, generics and around advice - 2");}
public void testFieldGet_pr114343_3() { runTest("field-get, generics and around advice - 3");}
public void testCaptureBinding_pr114744() { runTest("capturebinding wildcard problem");}
-
+ public void testAutoboxingAroundAdvice_pr119210_1() { runTest("autoboxing around advice - 1");}
+ public void testAutoboxingAroundAdvice_pr119210_2() { runTest("autoboxing around advice - 2");}
+ public void testAutoboxingAroundAdvice_pr119210_3() { runTest("autoboxing around advice - 3");}
public void testBadDecp_pr110788_1() { runTest("bad generic decp - 1");}
public void testBadDecp_pr110788_2() { runTest("bad generic decp - 2");}
public void testBadDecp_pr110788_3() { runTest("bad generic decp - 3");}
<compile files="Pr114054.aj" options=""/>
<run class="Pr114054"/>
</ajc-test>
+
+ <ajc-test dir="bugs150/pr119210" pr="119210" title="autoboxing around advice - 1">
+ <compile files="TestLib.java,ThreadAspectLib.java" options="-1.5"/>
+ <run class="TestLib">
+ <stderr>
+ <line text="obtaining five, got 3"/>
+ </stderr>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs150/pr119210" pr="119210" title="autoboxing around advice - 2">
+ <compile files="TestLib2.java,ThreadAspectLib2.java" options="-1.5"/>
+ <run class="TestLib2">
+ <stderr>
+ <line text="obtaining five, got 3"/>
+ </stderr>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs150/pr119210" pr="119210" title="autoboxing around advice - 3">
+ <compile files="TestLib2.java,ThreadAspectLib2.java">
+ <message kind="error" line="16" text="incompatible return type applying to method-call(java.lang.Integer TestLib2.getFive())"/>
+ <message kind="error" line="4" text="incompatible return type applying to method-call(java.lang.Integer TestLib2.getFive())"/>
+ </compile>
+ </ajc-test>
<ajc-test dir="bugs150/pr119539" pr="119539" title="generic pertypewithin aspect - 1">
<compile files="GenericPerTypeWithin.java" options="-1.5 -showWeaveInfo">