You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@any23.apache.org by "Lewis John McGibbney (JIRA)" <ji...@apache.org> on 2014/04/03 19:49:15 UTC

[jira] [Updated] (ANY23-195) Make all vocab constant instance's final as well as private and static

     [ https://issues.apache.org/jira/browse/ANY23-195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lewis John McGibbney updated ANY23-195:
---------------------------------------

    Attachment: ANY23-195.patch

I make reference to one of [~simone.tripodi]'s previous comments regarding thread safety in this regard.

bq.  this pattern is not thread safety, imagine 2 (or more) threads access to `getInstance()` method simultaneously, `instance` would be initialised more than once; we have 2 options: * initialise `instance` by default; or, if you want to keep the lazy initialisation: * synchronise all `getInstance()` methods. 

In the attached patch I've implemented the first.  

I've also sorted out all of the issues raised by Simo on this thread
http://mail-archives.apache.org/mod_mbox/any23-dev/201404.mbox/%3CCAAqLGLP7t_xQZj9ztTNqkJg9coM14tVyZTEwCKDWaUyRpJEkhQ%40mail.gmail.com%3E

> Make all vocab constant instance's final as well as private and static
> ----------------------------------------------------------------------
>
>                 Key: ANY23-195
>                 URL: https://issues.apache.org/jira/browse/ANY23-195
>             Project: Apache Any23
>          Issue Type: Improvement
>          Components: api
>    Affects Versions: 0.9.0
>            Reporter: Lewis John McGibbney
>             Fix For: 1.0.0
>
>         Attachments: ANY23-195.patch
>
>
> When we create a vocab instance we want it/them to be constant(s) and subsequently they have no need to change, during the app lifecycle.
>  



--
This message was sent by Atlassian JIRA
(v6.2#6252)