You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Jon Stevens <jo...@latchkey.com> on 2001/09/26 03:19:35 UTC
Re: cvs commit:
jakarta-turbine-fulcrum/src/services/java/org/apache/fulcrum/localization
LocaleTokenizer.java
Nice code DLR...
on 9/25/01 6:14 PM, "dlr@apache.org" <dl...@apache.org> wrote:
> acceptLang.quality =
> Float.parseFloat(q.substring(index + 1));
If someone hacks things and passes in a float that won't parse, this will
cause a parse exception. You should probably try/catch this and then in the
catch just have it set to 0.0 or something...
-jon
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
Re: cvs commit: jakarta-turbine-fulcrum/src/services/java/org/apache/fulcrum/localization LocaleTokenizer.java
Posted by Daniel Rall <dl...@finemaltcoding.com>.
Jon Stevens <jo...@latchkey.com> writes:
> Nice code DLR...
Thanks Jon.
> on 9/25/01 6:14 PM, "dlr@apache.org" <dl...@apache.org> wrote:
>
> > acceptLang.quality =
> > Float.parseFloat(q.substring(index + 1));
>
> If someone hacks things and passes in a float that won't parse, this will
> cause a parse exception. You should probably try/catch this and then in the
> catch just have it set to 0.0 or something...
Done, Apache style.
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org