-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
contentstack-java/src/main/java/com/contentstack/sdk/ContentType.java
Lines 128 to 134 in 16fe5c5
| 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
Labels
No labels