Community
Participate
Working Groups
In bug 249283, it got discovered that a patch with a null scope would not apply and also that it would cause problems while persisting. We need to make a clear statement whether or not the patch scope can be null or not.
The behaviour for a patch with a null scope and an empty[] scope was different. Using a null scope (or failing to set one while creating the patch) results in the planner determining that the patch applies to nothing and will not be installed. Using an empty scope (empty array) results in the planner assuming the patch applies to everything and proceeding to test whether the required changes apply. Since I couldn't get a null scope to install, there were no additional problems. However, after installing a patch with an empty scope, the NPEs showed up trying to read the profile xml. The reason why I was using an empty scope, was because I did not want to filter based on the provided capabilities of an iu. I wanted to get every iu with a certain required capability and change it.
The actual bug is bug 249483 :)
The scope of a patch can not be null. I have enforced that in the factory and fixed the test cases.