Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1234567891011121314151617181920212223242526
  1. import org.aspectj.testing.Tester;
  2. /** @testcase PR#838 checking around join point for advice return type - numeric */
  3. public class AroundNumericCastCE {
  4. public static double doubleMethod(int total){
  5. return (double) total;
  6. }
  7. public static int intMethod(int total){
  8. return total;
  9. }
  10. public static aspect Selector{
  11. // expect CE "illegal return value" from execution(int intMethod(int))
  12. double around(int i) : execution(* *Method(int)) && args(i) { // CE 17
  13. return proceed(i);
  14. }
  15. }
  16. public static void main(String[] args){
  17. double result = doubleMethod(1000);
  18. Tester.check(result != 0, "calculatePayment(1000)");
  19. }
  20. }