rnbwdsh commented on code in PR #3311:
URL: https://github.com/apache/cxf/pull/3311#discussion_r3622350913
##########
rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java:
##########
@@ -282,6 +284,16 @@ private MultipartBody createAttachments(String
propertyName) {
new AttachmentInputInterceptor().handleMessage(inMessage);
+ final Object maxCountProperty =
inMessage.getContextualProperty(AttachmentDeserializer.ATTACHMENT_MAX_COUNT);
+ int maxAttachmentCount =
AttachmentDeserializer.DEFAULT_ATTACHMENT_MAX_COUNT;
+ if (maxCountProperty != null) {
+ if (maxCountProperty instanceof Integer) {
Review Comment:
instanceof is also a null check -> i'd just do
if (maxCountProperty instanceof Integer) {
...
} else if (maxCountProperty instanceof String) {
...
} and remove the outer != null.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]