IDEMPIERE-455 Discover and fix FindBugs problems / Pattern LI_LAZY_INIT_UPDATE_STATIC

This commit is contained in:
Carlos Ruiz 2012-12-06 15:51:20 -05:00
parent c39cc3b81d
commit 47dde2cfe9
2 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ public class MEntityType extends X_AD_EntityType
* @param ctx context
* @return entity type array
*/
static public MEntityType[] getEntityTypes(Properties ctx)
static synchronized public MEntityType[] getEntityTypes(Properties ctx)
{
if (s_entityTypes != null)
return s_entityTypes;

View File

@ -49,7 +49,7 @@ public class AdempiereServerMgr
* Get Adempiere Server Manager
* @return mgr
*/
public static AdempiereServerMgr get()
public synchronized static AdempiereServerMgr get()
{
if (m_serverMgr == null)
{
@ -62,7 +62,7 @@ public class AdempiereServerMgr
} // get
/** Singleton */
private static AdempiereServerMgr m_serverMgr = null;
private static AdempiereServerMgr m_serverMgr = null;
/** Logger */
protected CLogger log = CLogger.getCLogger(getClass());