docs: public Permission createPermissionObject(String permissionClass, String target, String action, String credential, String principalType, String principalName, String fileName) {
          Permission permission = null;
          if ((target != null) && (target.equals("ALL FILES") || target.contains("ALL FILES"))) {
              target = "<<ALL FILES>>";
          }
          try {
              if (permissionClass != null && !permissionClass.equalsIgnoreCase("null")) {
                  // If this is a PrivateCredentialPermission
                  if (permissionClass.equalsIgnoreCase("javax.security.auth.PrivateCredentialPermission")) {
                      if (target == null || target.equalsIgnoreCase("null")) {
                          // Create target from the credential and principal details
                          StringBuilder targetString = new StringBuilder();
                          targetString.append(credential);
                          targetString.append(" ");
                          targetString.append(principalType);
                          targetString.append(" \"");
                          targetString.append(principalName);
                          targetString.append("\"");
  
                          permission = (Permission) getPermissionClass(permissionClass).getConstructor(String.class, String.class).newInstance(targetString.toString(), "read");
                      } else {
                          permission = (Permission) getPermissionClass(permissionClass).getConstructor(String.class, String.class).newInstance(target, "read");
                      }
                  } else {
                      if (action == null || action.equalsIgnoreCase("null")) {
                          if (target == null || target.equalsIgnoreCase("null")) {
                              permission = (Permission) getPermissionClass(permissionClass).newInstance();
                          } else {
                              permission = (Permission) getPermissionClass(permissionClass).getConstructor(String.class).newInstance(target);
                          }
                      } else {
                          permission = (Permission) getPermissionClass(permissionClass).getConstructor(String.class, String.class).newInstance(target, action);
                      }
                  }
              }
          } catch (Exception e) {
              if (tc.isWarningEnabled()) {
                  String rootCause = null;
  
                  if (e.getCause() != null) {
                      rootCause = e.getCause().getClass().getName() + "[" + e.getCause().getMessage() + "]";
                  } else if (e.getMessage() != null) {
                      rootCause = e.getClass().getName() + "[" + e.getMessage() + "]";
                  }
  
                  if (rootCause == null) {
                      rootCause = "unknown reasons";
                  }
                  if (e instanceof java.lang.ClassNotFoundException) {
                      Tr.warning(tc, PERMISSION_CLASSNOTFOUND, permissionClass, rootCause, fileName);
                  } else {
                      Tr.warning(tc, INCORRECT_PERMISSION_CONFIGURATION, permissionClass, rootCause, fileName);
                  }
              }
              if (e instanceof java.lang.ClassNotFoundException) {
                  permission = new UnresolvedPermission(permissionClass, target, action, null);
              }
          }
  
          return permission;
      }