View | Details | Raw Unified | Return to bug 118149 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/aspectj/systemtest/ajc150/Ajc150Tests.java (+3 lines)
Lines 793-798 Link Here
793
	  runTest("no NPE when inaccessible method is called within itd");
793
	  runTest("no NPE when inaccessible method is called within itd");
794
  }
794
  }
795
  
795
  
796
  public void testNoNPEWithOrPointcutAndMoreThanOneArgs_pr118149() {
797
	  runTest("no NPE with or pointcut and more than one args");
798
  }
796
  
799
  
797
  // helper methods.....
800
  // helper methods.....
798
  
801
  
(-)src/org/aspectj/systemtest/ajc150/ajc150.xml (+4 lines)
Lines 1276-1281 Link Here
1276
        <run class="foo.ITDWithACall"/>
1276
        <run class="foo.ITDWithACall"/>
1277
    </ajc-test>
1277
    </ajc-test>
1278
1278
1279
	<ajc-test dir="bugs150/pr118149" title="no NPE with or pointcut and more than one args">
1280
        <compile files="CommonEntity.java,Entity.java,ManageEntity.java,UIDEntityManagementAspect.aj"/>
1281
    </ajc-test>
1282
1279
    <!-- ============================================================================ -->
1283
    <!-- ============================================================================ -->
1280
    <!-- ============================================================================ -->
1284
    <!-- ============================================================================ -->
1281
    
1285
    
(-)bugs150/pr118149/CommonEntity.java (+3 lines)
Added Link Here
1
public class CommonEntity {
2
3
}
(-)bugs150/pr118149/Entity.java (+3 lines)
Added Link Here
1
public class Entity {
2
3
}
(-)bugs150/pr118149/ManageEntity.java (+6 lines)
Added Link Here
1
public class ManageEntity {
2
3
	public ManageEntity(Entity e,boolean b) {		
4
	}
5
	
6
}
(-)bugs150/pr118149/UIDEntityManagementAspect.aj (+21 lines)
Added Link Here
1
public aspect UIDEntityManagementAspect {
2
	
3
	public pointcut entityAccessor1(CommonEntity entity)
4
	: execution(* CommonEntity*(..))
5
	&& args(entity) && if(entity != null);
6
	
7
    public pointcut entityAccessor2(CommonEntity entity)
8
    : execution(ManageEntity.new(CommonEntity+, ..)) 
9
      && within(ManageEntity)
10
      && args(entity, ..)
11
      && if(entity != null);
12
13
	public pointcut entityAccessor(CommonEntity entity)
14
	    : entityAccessor1(entity) || entityAccessor2(entity);
15
	
16
	declare parents: Entity implements CommonEntity;
17
	
18
	before(CommonEntity entity) : entityAccessor(entity) {		
19
	}
20
21
}

Return to bug 118149