IDEMPIERE-5276 : NPE on MInfoWindow.get (#1303)
This commit is contained in:
parent
f784d469b4
commit
00c112b263
|
@ -48,7 +48,7 @@ public class MInfoWindow extends X_AD_InfoWindow implements ImmutablePOSupport
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 6723480469706009814L;
|
||||
private static final long serialVersionUID = -6793583766286122866L;
|
||||
|
||||
/** Cache */
|
||||
private static ImmutablePOCache<String,MInfoWindow> s_cache = new ImmutablePOCache<String,MInfoWindow>(Table_Name, 20);
|
||||
|
@ -222,12 +222,16 @@ public class MInfoWindow extends X_AD_InfoWindow implements ImmutablePOSupport
|
|||
* */
|
||||
public static MInfoWindow get(int infoWindowID, String trxName) {
|
||||
MInfoWindow iw = getInfoWindow(infoWindowID);
|
||||
|
||||
if (iw != null) {
|
||||
Boolean access = MRole.getDefault().getInfoAccess(iw.getAD_InfoWindow_ID());
|
||||
if (access != null && access.booleanValue()) {
|
||||
if (!Util.isEmpty(trxName, true))
|
||||
iw = new MInfoWindow(iw, trxName);
|
||||
return iw;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue