Quoting Jon Stevens <[EMAIL PROTECTED]>:

> Untested...
> 
> If there is an exception thrown during the processing, the file won't
> get
> deleted because it isn't in a try/finally statement...

That looks like a good idea (more robust).

I would add the finally block to the second try (the one in the sync(sessions) 
block) (apparently, if the first one is failing, it's only because no file 
exists).

Remy

> cvs diff StandardManager.java
> Index: StandardManager.java
> ===================================================================
> RCS file: 
> /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/se
> ssion/StandardManager.java,v
> retrieving revision 1.10
> diff -r1.10 StandardManager.java
> 353a354,355
> >         try {
> >
> 445,447c447,451
> <         // Delete the persistent storage file
> <         file.delete();
> <
> ---
> >         } finally {
> >             // Delete the persistent storage file
> >             if (file != null && file.exists() )
> >                 file.delete();
> >         }
> 

Reply via email to