-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable multipart/related on FileUpload #315
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #315 +/- ##
=============================================
- Coverage 74.50% 41.23% -33.27%
+ Complexity 265 173 -92
=============================================
Files 30 35 +5
Lines 1051 1072 +21
Branches 154 145 -9
=============================================
- Hits 783 442 -341
- Misses 200 596 +396
+ Partials 68 34 -34 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @mufasa1976
Please run 'mvn' locally before pushing and fix build issues.
I've fixed the Checkstyle Bugs. But now I got a failure from Jacoco.
The Problem is that I added a Test for the But this "Warning" will cause that the Code Coverage of the Module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mufasa1976
Thank you for your PR.
Please see my comments.
|
||
public abstract class AbstractRequestContext<T> implements RequestContext { | ||
/** | ||
* the Content-Type Pattern for multipart/related Requests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sentences start with a capital letter.
@@ -79,4 +85,7 @@ public String toString() { | |||
return String.format("%s [ContentLength=%s, ContentType=%s]", getClass().getSimpleName(), getContentLength(), getContentType()); | |||
} | |||
|
|||
protected boolean isMultipartRelated(final String contentType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New protected and public items should have a Javadoc and since
tag.
...pload2-core/src/main/java/org/apache/commons/fileupload2/core/FileItemInputIteratorImpl.java
Show resolved
Hide resolved
commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/RequestContext.java
Show resolved
Hide resolved
* | ||
* @return the Request is of type <code>multipart/related</code> | ||
*/ | ||
@Override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add since
Javadoc tag.
* Is the Request of type <code>multipart/related</code>? | ||
* | ||
* @return the Request is of type <code>multipart/related</code> | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add since
Javadoc tag.
* | ||
* @return the Request is of type <code>multipart/related</code> | ||
*/ | ||
@Override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add since
Javadoc tag.
* Is the Request of type <code>multipart/related</code>? | ||
* | ||
* @return the Request is of type <code>multipart/related</code> | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add since
Javadoc tag.
The point of the Jacoco check is to avoid making things worse and, conversely, to improve the overall quality of the component. So I encourage you to improve the state of the code. Run: |
I've ran It seems that Jacoco doesn't take care of Project-internal Dependencies because I've made a Code Coverage Run with IntelliJ on the Modules So unless there is a Chance to tell Jacoco to take some Dependencies in Content the only solution I see is to reduce the Line Complexity on |
Hello @mufasa1976 You added runtime code like: |
You're absolutly right. I've added a new Test |
Thank you very much for your patience |
SOAP-Requests with MTOM enabled are sending the Requests with Content-Type
multipart/related
.Because the Parts would not have
content-disposition
Headers they would not be recognized by the FileUploads as Parts.Because this Project is used by Wiremock it would fix the Issue wiremock/wiremock#2176