code: protected Set<Permission> getPermissions(CustomData customData) {
  
          Set<String> permStrings = getPermissionStrings(customData);
  
          if (CollectionUtils.isEmpty(permStrings)) {
              return Collections.emptySet();
          }
  
          PermissionResolver permissionResolver = getPermissionResolver();
  
          Set<Permission> perms = new HashSet<Permission>(permStrings.size());
  
          for (String s : permStrings) {
              Permission perm = permissionResolver.resolvePermission(s);
              perms.add(perm);
          }
  
          return perms;
      }
docs: Returns a set of Shiro {@link Permission} instances stored in the specified {@link CustomData} resource.  This
  implementation will:
  <ol>
  <li>{@link #getPermissionStrings(com.stormpath.sdk.directory.CustomData) Get all permission strings} stored
  in the CustomData instance</li>
  <li>Loop over these strings, and for each one, create a {@link Permission} instance using the
  {@link #getPermissionResolver() permissionResolver} property.</li>
  <li>Return the total constructed Set of Permission instances to the caller.</li>
  </ol>
  
  @param customData the CustomData instance that may contain permission strings to obtain
  @return a set of Shiro {@link Permission} instances stored in the specified {@link CustomData} resource.