You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

IfPCDExprAssignUnparseFailure.java 625B

123456789101112131415161718192021222324252627
  1. import org.aspectj.testing.Tester;
  2. /**
  3. * @author wes
  4. */
  5. public class IfPCDExprAssignUnparseFailure {
  6. public static void main(String[] args) {
  7. Tester.check(true, "compiler test");
  8. }
  9. }
  10. /**
  11. * NPE unwinding assignment in if pcd expression:
  12. * <pre>
  13. * unexpected exception:
  14. * org.aspectj.compiler.base.InternalCompilerError
  15. * java.lang.NullPointerException
  16. * at org.aspectj.compiler.base.ast.AssignExpr.unparse(AssignExpr.java:78)
  17. * <pre>
  18. * in revision 1.26 of AssignExpr.java.
  19. */
  20. aspect AspectFor {
  21. static int i;
  22. pointcut namedIf ()
  23. : if(0 == (i = 2)) ; // NPE unwinding assignment in if
  24. }