abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henrik Nordvik (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ABDERA-400) AtomDate gets TimeZone instance every time
Date Fri, 10 Oct 2014 16:21:34 GMT
Henrik Nordvik created ABDERA-400:

             Summary: AtomDate gets TimeZone instance every time
                 Key: ABDERA-400
                 URL: https://issues.apache.org/jira/browse/ABDERA-400
             Project: Abdera
          Issue Type: Bug
    Affects Versions: 1.1.2
            Reporter: Henrik Nordvik

AtomDate.parse and AtomDate.format both get the UTC timezone object for every time it's called.
This is constant and can be cached. We found this during profiling, because TimeZone.getTimeZone
is synchronized, which meant that only one thread could format or parse a date at a time.

Calendar c = Calendar.getInstance(TimeZone.getTimeZone("UTC"));

This message was sent by Atlassian JIRA

View raw message