[idempiere/idempiere] 4662d2: IDEMPIERE-6968 NPE in FavoriteSimpleTreeModel.rend...

2 views
Skip to first unread message

Md. Shahriar Karim Shawon

unread,
Sep 18, 2026, 8:50:05 AM (yesterday) Sep 18
to idempi...@googlegroups.com
Branch: refs/heads/master
Home: https://github.com/idempiere/idempiere
Commit: 4662d21c20236890db990aa1bfe13264557469a8
https://github.com/idempiere/idempiere/commit/4662d21c20236890db990aa1bfe13264557469a8
Author: Md. Shahriar Karim Shawon <shawo...@gmail.com>
Date: 2026-09-18 (Fri, 18 Sep 2026)

Changed paths:
M org.adempiere.base/src/org/compiere/model/MToolBarButtonRestrict.java
A org.idempiere.test/src/org/idempiere/test/model/MToolBarButtonRestrictTest.java

Log Message:
-----------
IDEMPIERE-6968 NPE in FavoriteSimpleTreeModel.render() when role lacks window access (#3364)

MRole.getWindowAccess(int) is documented to return null when the role has no
access to the window at all. MToolBarButtonRestrict.isNewButtonRestricted
assigned that Boolean to a primitive, so the null was auto-unboxed and threw
NullPointerException.

This was the only call site in core that unboxed the result; every other caller
holds it in a Boolean and null-checks it.

Treat "no access record" as "no access", so the New button is reported as
restricted instead of throwing.

Reachable from at least two paths:
- FavoriteSimpleTreeModel.render(), when a favorite added under one role is
rendered under another role that cannot access the window.
- WEditorPopupMenu, when the role has no access to the SO zoom window but has
access to the PO one.

Co-authored-by: Claude Opus 5 <nor...@anthropic.com>



To unsubscribe from these emails, change your notification settings at https://github.com/idempiere/idempiere/settings/notifications
Reply all
Reply to author
Forward
0 new messages