6.2.X EE, 7.0.X EE, Master
The RoleLocalServiceUtil.getResourceRoles(long, String, int, String) method is completely unusable because its SQL query is missing from portal.xml. Calling this method will always result in a NullPointerException being thrown.
Steps to Reproduce
- Start up Liferay
- Log in as an administrator.
- Navigate to Admin > Control Panel > Server Administration > Scripts
- Change Language to Groovy.
- Paste the contents of the attached callGetResourceRoles.groovy file into the Script box (use the file that corresponds to the version of Liferay you are testing on).
- Click execute.
Expected Result: The script will complete without error. For this script, this will most likely just return an empty map as follows:
If you want to test it in more detail, you can modify the name, scope, and primKey variables to match an entry in the ResourcePermission table and see the map that is returned.
Actual Result: The script throws a NullPointerException, which you can see in the console. The map of resource roles is not printed out.
master - a61624d5129b8d26f7ba6a9c07f76130fd565b28: Reproduced
ee-7.0.x - 606d9d902aef50ca425f401e51ef30ff8d02e70e - Reproduced
ee-6.2.x - da614c15129e7e4f4fc1721372f3621f44adb365: Reproduced