Hi Simo,
On Sat, Feb 2, 2013 at 2:29 AM, <[email protected]> wrote:
> Re: svn commit: r1441675 -
> /any23/trunk/api/src/main/java/org/apache/any23/vocab/
> 2289 by: Simone Tripodi
> Hi Lewis!
Hi Simo. Just to confirm (I've been cycling all day and brain not
working quite well yet... need a coffee) you've highlighted two
issues.
1) Class naming conventions
2) Thread safety when using accessor methods for vocabularly classes
Can you please confirm?
Also please see my comments inline.
> please apologise in advance my lack of knowledge on that topic, I have
> some minor observations about the code style:
>
>>
>> any23/trunk/api/src/main/java/org/apache/any23/vocab/LKIF_CORE_ACTION.java
>
> in my humble opinion, this way of naming classes is a little
> confusing, since usually it is referred to static constants, I would
> replace them with `LkifCoreAction`.
> Keep it jut as my opinion, anyway ;)
No you are completely right Simo. I was just following the existing
class naming convention for the existing vocab classes. I will address
this issue tomorrow, thanks and good catch!
>
>> + public static DOAP getInstance() {
>> if(instance == null) {
>> instance = new DOAP();
>> }
>> return instance;
>> }
>
> this pattern is not thread safety, immagine 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.
I am kinda in the dark on this one. I see that you and Peter are
currently discussing the issue.
If one of you would be good enough to open an issue then I would be
happy to work on it.
Thank you
Lewis