any23-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Tripodi <>
Subject Re: svn commit: r1441675 - /any23/trunk/api/src/main/java/org/apache/any23/vocab/
Date Sat, 02 Feb 2013 10:28:54 GMT
Hi Lewis!

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/

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 ;)

> +    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.

HTH, have a nice day!

View raw message