Robert Burrell Donkin ha scritto: > On 8/9/07, Stefano Bagnara <[EMAIL PROTECTED]> wrote: >> Furthermore, I see that this block is allowed to send SieveException. >> Maybe the setInstance(oldManager) should be called in a finally to make >> sure we place back the status to the right one (well, maybe after an >> exception the ConditionManager is ignored, but I think it is anyway >> better to cleanup). > > http://svn.apache.org/repos/asf/james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractConditionalCommand.java > > already has > > protected Object execute(MailAdapter mail, Block block) throws > SieveException > { > // Switch to a new ConditionManager > ConditionManager oldManager = ConditionManager.getInstance(); > ConditionManager.resetInstance(); > > try > { > // Execute the Block > Object result = block.execute(mail); > return result; > } > finally > { > // Always restore the old ConditionManager > ConditionManager.setInstance(oldManager); > } > } > > hope that this should cover it > > - robert
You are right! Sorry but I was examining an old local checkout of jsieve and I didn't remember that you already fixed this more than one month ago (this is the second diff I lost in that time frame... maybe I've had a black out ;-) ). The fix you already applied was exactly what I was proposing ;-) Thank you, Stefano --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
