IDEMPIERE-3379 MRole.get(...) is not thread safe

This commit is contained in:
Heng Sin Low 2017-05-31 07:29:21 +08:00
parent 7ebc5f515a
commit e466ebd1ae
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ public final class MRole extends X_AD_Role
* @param reload if true forces load * @param reload if true forces load
* @return role * @return role
*/ */
public static MRole get (Properties ctx, int AD_Role_ID, int AD_User_ID, boolean reload) public synchronized static MRole get (Properties ctx, int AD_Role_ID, int AD_User_ID, boolean reload)
{ {
if (s_log.isLoggable(Level.INFO)) s_log.info("AD_Role_ID=" + AD_Role_ID + ", AD_User_ID=" + AD_User_ID + ", reload=" + reload); if (s_log.isLoggable(Level.INFO)) s_log.info("AD_Role_ID=" + AD_Role_ID + ", AD_User_ID=" + AD_User_ID + ", reload=" + reload);
String key = AD_Role_ID + "_" + AD_User_ID; String key = AD_Role_ID + "_" + AD_User_ID;