[jira] [Commented] (LANG-909) Thread-safe wrapper for SimpleDateFormat

2014-01-25 Thread Dmitry Katsubo (JIRA)

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

Dmitry Katsubo commented on LANG-909:
-

[~charles_hon...@intuit.com] Then I would completely agree that this bug can be 
closed. Looking forward for next 3.x release!

> Thread-safe wrapper for SimpleDateFormat
> 
>
> Key: LANG-909
> URL: https://issues.apache.org/jira/browse/LANG-909
> Project: Commons Lang
>  Issue Type: New Feature
>  Components: lang.time.*
>Affects Versions: 3.1
>Reporter: Dmitry Katsubo
>Priority: Minor
> Fix For: Review Patch
>
> Attachments: DateFormatAdapter.java, ThreadSafeSimpleDateFormat.java, 
> ThreadSafeSimpleDateFormatTest.java
>
>
> {{SimpleDateFormat}} implementation in JDK is known to be [not 
> thread-safe|http://stackoverflow.com/questions/6840803/simpledateformat-thread-safety].
>  The attached helper class solves the problem by holding a separate instance 
> of {{SimpleDateFormat}} per thread.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (LANG-909) Thread-safe wrapper for SimpleDateFormat

2014-01-24 Thread Charles Honton (JIRA)

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

Charles Honton commented on LANG-909:
-

The documentation is incorrect.  (See LANG-958).  FastDateParser has been 
exhaustively tested against Calendars returned by Calendar.getInstance(TimeZone 
zone, Locale aLocale) iterating through the cross product of 
Locale.getAvailableLocales(), Timezone.getAvailableIDs()

> Thread-safe wrapper for SimpleDateFormat
> 
>
> Key: LANG-909
> URL: https://issues.apache.org/jira/browse/LANG-909
> Project: Commons Lang
>  Issue Type: New Feature
>  Components: lang.time.*
>Affects Versions: 3.1
>Reporter: Dmitry Katsubo
>Priority: Minor
> Fix For: Review Patch
>
> Attachments: DateFormatAdapter.java, ThreadSafeSimpleDateFormat.java, 
> ThreadSafeSimpleDateFormatTest.java
>
>
> {{SimpleDateFormat}} implementation in JDK is known to be [not 
> thread-safe|http://stackoverflow.com/questions/6840803/simpledateformat-thread-safety].
>  The attached helper class solves the problem by holding a separate instance 
> of {{SimpleDateFormat}} per thread.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (LANG-909) Thread-safe wrapper for SimpleDateFormat

2014-01-24 Thread Dmitry Katsubo (JIRA)

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

Dmitry Katsubo commented on LANG-909:
-

[~britter]: As you can read from {{FastDateParser}} JavaDoc, it supports into 
Gregorian calendars. For other calendars it creates {{SimpleDateFormat}}. In 
such "unpopular" scenarios {{ThreadSafeSimpleDateFormat}} is still beneficial. 
However added value is not big, so maybe one can copy code to his project 
directly from this issue after googling a while.

> Thread-safe wrapper for SimpleDateFormat
> 
>
> Key: LANG-909
> URL: https://issues.apache.org/jira/browse/LANG-909
> Project: Commons Lang
>  Issue Type: New Feature
>  Components: lang.time.*
>Affects Versions: 3.1
>Reporter: Dmitry Katsubo
>Priority: Minor
> Fix For: Review Patch
>
> Attachments: DateFormatAdapter.java, ThreadSafeSimpleDateFormat.java, 
> ThreadSafeSimpleDateFormatTest.java
>
>
> {{SimpleDateFormat}} implementation in JDK is known to be [not 
> thread-safe|http://stackoverflow.com/questions/6840803/simpledateformat-thread-safety].
>  The attached helper class solves the problem by holding a separate instance 
> of {{SimpleDateFormat}} per thread.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (LANG-909) Thread-safe wrapper for SimpleDateFormat

2014-01-24 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter commented on LANG-909:
--

So in the end we don't need the ThreadSafeSimpleDateFormat anymore, since 
FastDateParser has been released in the mean time. Resolve as "won't fix"?

> Thread-safe wrapper for SimpleDateFormat
> 
>
> Key: LANG-909
> URL: https://issues.apache.org/jira/browse/LANG-909
> Project: Commons Lang
>  Issue Type: New Feature
>  Components: lang.time.*
>Affects Versions: 3.1
>Reporter: Dmitry Katsubo
>Priority: Minor
> Fix For: Review Patch
>
> Attachments: DateFormatAdapter.java, ThreadSafeSimpleDateFormat.java, 
> ThreadSafeSimpleDateFormatTest.java
>
>
> {{SimpleDateFormat}} implementation in JDK is known to be [not 
> thread-safe|http://stackoverflow.com/questions/6840803/simpledateformat-thread-safety].
>  The attached helper class solves the problem by holding a separate instance 
> of {{SimpleDateFormat}} per thread.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (LANG-909) Thread-safe wrapper for SimpleDateFormat

2014-01-13 Thread Charles Honton (JIRA)

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

Charles Honton commented on LANG-909:
-

FastDateFormat was designed to be thread safe.  The thread safe wrapper came in 
slightly after FastDateFormat was completed, and before FastDateFormat was 
released.   There was at one point a unit test that proved SimpleDateFormat 
failed multi-thread safety, while FastDateFormat passed.

> Thread-safe wrapper for SimpleDateFormat
> 
>
> Key: LANG-909
> URL: https://issues.apache.org/jira/browse/LANG-909
> Project: Commons Lang
>  Issue Type: New Feature
>  Components: lang.time.*
>Affects Versions: 3.1
>Reporter: Dmitry Katsubo
>Priority: Minor
> Fix For: Review Patch
>
> Attachments: DateFormatAdapter.java, ThreadSafeSimpleDateFormat.java, 
> ThreadSafeSimpleDateFormatTest.java
>
>
> {{SimpleDateFormat}} implementation in JDK is known to be [not 
> thread-safe|http://stackoverflow.com/questions/6840803/simpledateformat-thread-safety].
>  The attached helper class solves the problem by holding a separate instance 
> of {{SimpleDateFormat}} per thread.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (LANG-909) Thread-safe wrapper for SimpleDateFormat

2014-01-11 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter commented on LANG-909:
--

I'm expecting that we will roll out at least 3.3 before making the move to 4.0 
(and Java 8). What I don't understand is, do we really need this or is 
FastDateParser enough? Would be nice to have test that fails with 
FastDateParser but works with the ThreadSafeSimpleDateFormat.

> Thread-safe wrapper for SimpleDateFormat
> 
>
> Key: LANG-909
> URL: https://issues.apache.org/jira/browse/LANG-909
> Project: Commons Lang
>  Issue Type: New Feature
>  Components: lang.time.*
>Affects Versions: 3.1
>Reporter: Dmitry Katsubo
>Priority: Minor
> Fix For: Review Patch
>
> Attachments: DateFormatAdapter.java, ThreadSafeSimpleDateFormat.java, 
> ThreadSafeSimpleDateFormatTest.java
>
>
> {{SimpleDateFormat}} implementation in JDK is known to be [not 
> thread-safe|http://stackoverflow.com/questions/6840803/simpledateformat-thread-safety].
>  The attached helper class solves the problem by holding a separate instance 
> of {{SimpleDateFormat}} per thread.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (LANG-909) Thread-safe wrapper for SimpleDateFormat

2013-10-22 Thread Henri Yandell (JIRA)

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

Henri Yandell commented on LANG-909:


Agreed - the proposal for Lang 4.0 is to be Java 8 compatible. So my note is 
meant to read as 'would we be removing this in Lang 4.0?'

> Thread-safe wrapper for SimpleDateFormat
> 
>
> Key: LANG-909
> URL: https://issues.apache.org/jira/browse/LANG-909
> Project: Commons Lang
>  Issue Type: New Feature
>  Components: lang.time.*
>Affects Versions: 3.1
>Reporter: Dmitry Katsubo
>Priority: Minor
> Fix For: Review Patch
>
> Attachments: DateFormatAdapter.java, ThreadSafeSimpleDateFormat.java, 
> ThreadSafeSimpleDateFormatTest.java
>
>
> {{SimpleDateFormat}} implementation in JDK is known to be [not 
> thread-safe|http://stackoverflow.com/questions/6840803/simpledateformat-thread-safety].
>  The attached helper class solves the problem by holding a separate instance 
> of {{SimpleDateFormat}} per thread.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (LANG-909) Thread-safe wrapper for SimpleDateFormat

2013-10-22 Thread Dmitry Katsubo (JIRA)

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

Dmitry Katsubo commented on LANG-909:
-

Perhaps Java8 does not need this class (it will have better date/time 
functionality support), but {{commons-lang}} is Java1.5-compatible, is it?

> Thread-safe wrapper for SimpleDateFormat
> 
>
> Key: LANG-909
> URL: https://issues.apache.org/jira/browse/LANG-909
> Project: Commons Lang
>  Issue Type: New Feature
>  Components: lang.time.*
>Affects Versions: 3.1
>Reporter: Dmitry Katsubo
>Priority: Minor
> Fix For: Review Patch
>
> Attachments: DateFormatAdapter.java, ThreadSafeSimpleDateFormat.java, 
> ThreadSafeSimpleDateFormatTest.java
>
>
> {{SimpleDateFormat}} implementation in JDK is known to be [not 
> thread-safe|http://stackoverflow.com/questions/6840803/simpledateformat-thread-safety].
>  The attached helper class solves the problem by holding a separate instance 
> of {{SimpleDateFormat}} per thread.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (LANG-909) Thread-safe wrapper for SimpleDateFormat

2013-10-21 Thread Henri Yandell (JIRA)

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

Henri Yandell commented on LANG-909:


Marking as Review Patch; though a question to ask here is what we would do with 
this code in Java 8. Does it remove the need for this.

> Thread-safe wrapper for SimpleDateFormat
> 
>
> Key: LANG-909
> URL: https://issues.apache.org/jira/browse/LANG-909
> Project: Commons Lang
>  Issue Type: New Feature
>  Components: lang.time.*
>Affects Versions: 3.1
>Reporter: Dmitry Katsubo
>Priority: Minor
> Fix For: Review Patch
>
> Attachments: DateFormatAdapter.java, ThreadSafeSimpleDateFormat.java, 
> ThreadSafeSimpleDateFormatTest.java
>
>
> {{SimpleDateFormat}} implementation in JDK is known to be [not 
> thread-safe|http://stackoverflow.com/questions/6840803/simpledateformat-thread-safety].
>  The attached helper class solves the problem by holding a separate instance 
> of {{SimpleDateFormat}} per thread.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (LANG-909) Thread-safe wrapper for SimpleDateFormat

2013-08-06 Thread Sebb (JIRA)

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

Sebb commented on LANG-909:
---

@Dmitry: before making any changes to the patch, I suggest you check whether 
the FastDate* classes provide everything that SimpleDateFormat does. If not, 
then probably the FastDate classes should be extended, rather than creating a 
thread safe wrapper.

As to formatting - AFAIK there are no Eclipse downloads.
As for any project, keep to the existing formatting in a source file unless 
otherwise advised.

Regarding test cases for different formats: 
the class requires the format as a parameter to the constructor.
Therefore it is vital that the tests include more that just one format string 
to ensure that the parameter is handled correctly now, and continues to be 
handled correctly if the class is ever changed.

> Thread-safe wrapper for SimpleDateFormat
> 
>
> Key: LANG-909
> URL: https://issues.apache.org/jira/browse/LANG-909
> Project: Commons Lang
>  Issue Type: New Feature
>  Components: lang.time.*
>Affects Versions: 3.1
>Reporter: Dmitry Katsubo
>Priority: Minor
> Attachments: ThreadSafeDateFormat.java, ThreadSafeDateFormatTest.java
>
>
> {{SimpleDateFormat}} implementation in JDK is known to be [not 
> thread-safe|http://stackoverflow.com/questions/6840803/simpledateformat-thread-safety].
>  The attached helper class solves the problem by holding a separate instance 
> of {{SimpleDateFormat}} per thread.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (LANG-909) Thread-safe wrapper for SimpleDateFormat

2013-08-06 Thread Dmitry Katsubo (JIRA)

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

Dmitry Katsubo commented on LANG-909:
-

[~s...@apache.org]: I will apply the code style changes you have mentioned. To 
make it easier: are there code formatting rules for Eclipse which I can 
download? This from 
[here|http://maven.apache.org/developers/conventions/code.html#Eclipse_3.2] are 
for Maven project and seem to be different from what Apache commons is using. 
Unit tests do not test different formats because from implementation it is 
clear that formatting is delegated to {{SimpleDateFormat}}; adding such test 
does not add any code or branch coverage to existing test thus to my mind it is 
useless.

[~charles_hon...@intuit.com]: Future parser looks good. Will the adapter for 
{{java.text.DateFormat}} be included? A lot of legacy/3rdparty code is based on 
that JDK API, so it would be nice to keep compatibility.

> Thread-safe wrapper for SimpleDateFormat
> 
>
> Key: LANG-909
> URL: https://issues.apache.org/jira/browse/LANG-909
> Project: Commons Lang
>  Issue Type: New Feature
>  Components: lang.time.*
>Affects Versions: 3.1
>Reporter: Dmitry Katsubo
>Priority: Minor
> Attachments: ThreadSafeDateFormat.java, ThreadSafeDateFormatTest.java
>
>
> {{SimpleDateFormat}} implementation in JDK is known to be [not 
> thread-safe|http://stackoverflow.com/questions/6840803/simpledateformat-thread-safety].
>  The attached helper class solves the problem by holding a separate instance 
> of {{SimpleDateFormat}} per thread.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (LANG-909) Thread-safe wrapper for SimpleDateFormat

2013-08-06 Thread Sebb (JIRA)

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

Sebb commented on LANG-909:
---

@Charles: good point, I'd forgotten about them.
[BTW, FastDateFormat is already released in 3.1, but the other classes are new]

Are there any uses of SimpleDateFormat that are not covered by the FastDate 
classes?

> Thread-safe wrapper for SimpleDateFormat
> 
>
> Key: LANG-909
> URL: https://issues.apache.org/jira/browse/LANG-909
> Project: Commons Lang
>  Issue Type: New Feature
>  Components: lang.time.*
>Affects Versions: 3.1
>Reporter: Dmitry Katsubo
>Priority: Minor
> Attachments: ThreadSafeDateFormat.java, ThreadSafeDateFormatTest.java
>
>
> {{SimpleDateFormat}} implementation in JDK is known to be [not 
> thread-safe|http://stackoverflow.com/questions/6840803/simpledateformat-thread-safety].
>  The attached helper class solves the problem by holding a separate instance 
> of {{SimpleDateFormat}} per thread.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (LANG-909) Thread-safe wrapper for SimpleDateFormat

2013-08-06 Thread Charles Honton (JIRA)

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

Charles Honton commented on LANG-909:
-

To answer my own question, these classes haven't yet been packaged into a 
release.

> Thread-safe wrapper for SimpleDateFormat
> 
>
> Key: LANG-909
> URL: https://issues.apache.org/jira/browse/LANG-909
> Project: Commons Lang
>  Issue Type: New Feature
>  Components: lang.time.*
>Affects Versions: 3.1
>Reporter: Dmitry Katsubo
>Priority: Minor
> Attachments: ThreadSafeDateFormat.java, ThreadSafeDateFormatTest.java
>
>
> {{SimpleDateFormat}} implementation in JDK is known to be [not 
> thread-safe|http://stackoverflow.com/questions/6840803/simpledateformat-thread-safety].
>  The attached helper class solves the problem by holding a separate instance 
> of {{SimpleDateFormat}} per thread.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (LANG-909) Thread-safe wrapper for SimpleDateFormat

2013-08-06 Thread Charles Honton (JIRA)

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

Charles Honton commented on LANG-909:
-

Why not use the thread-safe classes in Lang3?  
org.apache.commons.lang3.time.FastDateParser, 
org.apache.commons.lang3.time.FastDateFormat and 
org.apache.commons.lang3.time.FastDatePrinter.

> Thread-safe wrapper for SimpleDateFormat
> 
>
> Key: LANG-909
> URL: https://issues.apache.org/jira/browse/LANG-909
> Project: Commons Lang
>  Issue Type: New Feature
>  Components: lang.time.*
>Affects Versions: 3.1
>Reporter: Dmitry Katsubo
>Priority: Minor
> Attachments: ThreadSafeDateFormat.java, ThreadSafeDateFormatTest.java
>
>
> {{SimpleDateFormat}} implementation in JDK is known to be [not 
> thread-safe|http://stackoverflow.com/questions/6840803/simpledateformat-thread-safety].
>  The attached helper class solves the problem by holding a separate instance 
> of {{SimpleDateFormat}} per thread.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (LANG-909) Thread-safe wrapper for SimpleDateFormat

2013-08-06 Thread Sebb (JIRA)

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

Sebb commented on LANG-909:
---

Thanks for the patch. Looks useful.

However, there are a few minor issues with the patch.
- tabs are not allowed; we use 4 spaces for indentation
- @author is deprecated in ASF code; we use other means to credit contributors.
- the files should include the standard AL header
- the class name should probably be ThreadSafeSimpleDateFormat
- the test class does not test different formats.


> Thread-safe wrapper for SimpleDateFormat
> 
>
> Key: LANG-909
> URL: https://issues.apache.org/jira/browse/LANG-909
> Project: Commons Lang
>  Issue Type: New Feature
>  Components: lang.time.*
>Affects Versions: 3.1
>Reporter: Dmitry Katsubo
>Priority: Minor
> Attachments: ThreadSafeDateFormat.java, ThreadSafeDateFormatTest.java
>
>
> {{SimpleDateFormat}} implementation in JDK is known to be [not 
> thread-safe|http://stackoverflow.com/questions/6840803/simpledateformat-thread-safety].
>  The attached helper class solves the problem by holding a separate instance 
> of {{SimpleDateFormat}} per thread.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira