[EMAIL PROTECTED] sent:
...
> Modified: src/java/org/apache/velocity/tools/generic DateTool.java
> Log:
> * src/java/org/apache/velocity/tools/generic/DateTool.java
> getDateFormat(int, int, Locale, TimeZone): Sun JDK 1.4.2 warns
> against using a "return" statement in a "finally" block. I assume
> that this is because any exception which and put you into the
> "finally" block in the first place is subsequently discarded by the
> "return". Be more explicit about this behavior by catching and
> suppressing any RuntimeException, and returning any DateFormat
> instance we've procured so far. This mirrors previous behavior.
> Here's the JDK 1.4 warning message for reference:
...
> RCS file:
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/generic/Da
teTool.java,v
> retrieving revision 1.5
> retrieving revision 1.6
> diff -u -u -r1.5 -r1.6
> --- DateTool.java 6 Nov 2003 00:26:54 -0000 1.5
> +++ DateTool.java 11 Nov 2003 00:33:32 -0000 1.6
> @@ -565,10 +565,10 @@
> }
> df.setTimeZone(timezone);
> }
> - finally
> + catch (RuntimeException suppressed)
> {
> - return df;
> }
> + return df;
> }
interesting. but yeah, i guess it is more explicit this way. and that
reminds me i'm still using 1.4.1... :)
Nathan Bubna
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]