-
Bug
-
Resolution: Fixed
-
Major
-
4.3.1
-
None
-
None
When using I18nContentSupport the NodeMapWrapper may incorrectly wrap also null values, causing NPEs when trying to access properties.
This is a sample code (it surely happens using the now deprecated getChildByName() method, but there could be other cases):
Content test = wrapped.getChildByName("child") if (test !=null) { test.getNodeData("x"); }
Without the content wrapper If getChildByName("child") return nulls everything works fine.
But If the original node is wrapped, the returned null gets wrapped in a I18nContentWrapper, so that the null check passes but the getNodeData() call will throw a NPE.
Acceptance criteria