You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org> on 2012/02/01 19:36:58 UTC

[jira] [Commented] (CASSANDRA-3822) JdbcDate.getString(ByteBuffer) appears to not be multithreaded safe

    [ https://issues.apache.org/jira/browse/CASSANDRA-3822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13198034#comment-13198034 ] 

Jonathan Ellis commented on CASSANDRA-3822:
-------------------------------------------

I poked at this a bit and decided that replacing SDF w/ Calendar isn't quite as simple as a text substitution. :)
                
> JdbcDate.getString(ByteBuffer) appears to not be multithreaded safe
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-3822
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3822
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Dave Brosius
>            Priority: Trivial
>
> JdbcDate.getString(ByteBuffer) makes use of a static SimpleDateFormat
> static final SimpleDateFormat FORMATTER = new SimpleDateFormat(DEFAULT_FORMAT);
> SimpleDateFormat is not thread safe, as it uses a field from parent class DateFormat
>     protected Calendar calendar;
> to convert dates to calendars.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira