Skip to content

Invalid warning for contentTypeUid #58

Closed

Description

@gurban-h

if (contentTypeUid != null && !contentTypeUid.isEmpty()) {
try {
throw new IllegalAccessException("contentTypeUid is required");
} catch (Exception e) {
logger.warning("contentTypeUid is required");
}
}

Condition for checking the parameter is incorrect, and doesn't match with the warning message. It must be

if (contentTypeUid == null || contentTypeUid.isEmpty()) {
    logger.warning("contentTypeUid is required");
}

It is not clear to me why an exception is thrown and caught there not to be used.
Also if contentTypeUid is required why it is logged as warning?

Activity

  1. ishaileshmishra commented on Jun 13, 2022

    @ishaileshmishra
    Contributor

    thanks for writing us @gurban-h, We will update the code.

  2. added 2 commits that reference this issue on Jun 16, 2022
  3. added a commit that references this issue on Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions