Return-Path: X-Original-To: apmail-any23-dev-archive@www.apache.org Delivered-To: apmail-any23-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7124210B16 for ; Thu, 3 Apr 2014 17:49:21 +0000 (UTC) Received: (qmail 47176 invoked by uid 500); 3 Apr 2014 17:49:19 -0000 Delivered-To: apmail-any23-dev-archive@any23.apache.org Received: (qmail 46179 invoked by uid 500); 3 Apr 2014 17:49:17 -0000 Mailing-List: contact dev-help@any23.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@any23.apache.org Delivered-To: mailing list dev@any23.apache.org Received: (qmail 46145 invoked by uid 99); 3 Apr 2014 17:49:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Apr 2014 17:49:15 +0000 Date: Thu, 3 Apr 2014 17:49:15 +0000 (UTC) From: "Lewis John McGibbney (JIRA)" To: dev@any23.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (ANY23-195) Make all vocab constant instance's final as well as private and static MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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)