Newbie got a NullPointerException :) [message #590093] |
Sat, 24 September 2005 22:51 |
Eclipse User |
|
|
|
Originally posted by: Dominik.pich.info
Well, I'm quite new to AOP,aspectJ and AJDT, so I cannot really judge when
it is ME making a mistake or the computer(aspectj/ajdt)
Anyway, when compiled the code below with eclipse 3.1 using ajdt throws a
NullPointerException...
---
Eclipse AspectJ Development Tools
Version: 1.3.0
Build id: 20050921231918
AspectJ version: 1.5.0.20050919101948
---
package org.implemented.ed2kRelay.aspects;
import org.implemented.library.net.IDataPool;
import org.implemented.library.net.messaging.Message;
/**
* This class provides support for throwing exceptions when a call to a
data pool fails
* Only applicaple for pools typed <Message, Integer>
*/
public aspect Validate {
pointcut valid(IDataPool pool, Message value, Integer key):
call(public boolean IDataPool.validate(Message, Integer))
&& target(pool)
&& args(value, key);
after(IDataPool pool, Message value, Integer key) returning(boolean
validated): valid(pool,value,key) {
doConditionalThrow(value, (Message)pool.get(key), validated);
}
/*
* From here on, it's an ordinary class implementation.
*/
private void doConditionalThrow(Message value, Message keyed, boolean
b) {
//look at bool passed
}
}
|
|
|
Powered by
FUDForum. Page generated in 0.04806 seconds