Skip to content

Invalid warning for contentTypeUid #58

@gurban-h

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?

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