|
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?
contentstack-java/src/main/java/com/contentstack/sdk/ContentType.java
Lines 128 to 134 in 16fe5c5
Condition for checking the parameter is incorrect, and doesn't match with the warning message. It must be
It is not clear to me why an exception is thrown and caught there not to be used.
Also if
contentTypeUidis required why it is logged aswarning?