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

Michael Bolz commented on OLINGO-1349:
--------------------------------------

Hi [~psteuer],

For Olingo 2.x we still stick to Java 1.6 compatibility. Hence use of 
{{ZoneId}} is not possible.
However store the TimeZone to a static field should solve the 
synchronized/performance issue.
I created a [branch with a possible 
solution|https://gitbox.apache.org/repos/asf?p=olingo-odata2.git;a=commit;h=cd2db731c9df27a45ae97346ccc5fc5665e83473].
 Please let me know if you think this solve your issue (or ideally test it and 
let us know your result).

Kind Regards, Michael

> EdmTime use synchronized TimeZone.getTimeZone("GMT")
> ----------------------------------------------------
>
>                 Key: OLINGO-1349
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1349
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-core
>    Affects Versions: V2 2.0.11
>            Reporter: Patrik Steuer
>            Assignee: Michael Bolz
>            Priority: Major
>
> *Problem:*
> [EdmTime.class:internalValueToString|https://github.com/apache/olingo-odata2/blob/master/odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/edm/EdmTime.java#L132]
>  calls TimeZone.getTimeZone("GMT") which is synchronized. This adds overhead 
> to apps using this function. 
> *Possible Solution:*
> Either use a more modern class like ZoneId.of() or use a static variable to 
> reuse the timezone.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to