I am trying to run a method after returning data in a set of code.
If I put it below the return, it will become unreachable code. If I put in above, I am not able to extract data out of it since it will only insert the data into SQL after the return method.
I am using an open source James Email Server to do this.
So for example.. the code is like this..
public class testList
extends GenericMatcher
{
public Collection test(Mail mail) {
/*All the processing of the mail datas and checks will be done here..
after which, return mail.getRecipients(); at the end will send
the result back to.. I dont know where? This return will then
insert it into the SQL table. So I would like to move this data
from that SQL table to another SQL table that is why I
need to access only after the return method.*/
if (test.contains(test1)) {
return mail.getRecipients();
//call other method here
} else {
return null;
}
}
}
So is there a way for me to call the method or do some more data processing after the return method? I have no idea where does the return method go to too.