-
Notifications
You must be signed in to change notification settings - Fork 203
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
#594 RqMultipart.java - Removing the warning suppression (PMD.ConstructorOnlyInitializesOrCallOtherConstructors) #641
Conversation
Solving puzzle 558-afc1c081 in src/main/java/org/takes/rq/RqMultipart.java:131-135
@davvd Could you find someone to review it? |
@dalifreire Thanks, let me find someone who can review this pull request |
@krzyk it's yours,please review |
@dalifreire please provide a better description of the PR, write what you did |
@dalifreire same for the PR title, saying that you solved some bug/todo ID is not enough, PR title should be a short description of the work, and the description should be more elaborate information |
@krzyk Please, could you take a look again? |
// @checkstyle MagicNumberCheck (1 line) | ||
Math.min(8192, stream.available()) | ||
); | ||
this.body = Base.body(req); |
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.
@dalifreire making a static method is a workaround not a solution. Here you could store the stream as a field and create Channel in requests
method and pass the created variable to copy
and make
.
@dalifreire added one more comment |
@krzyk Thanks for review! Please, take a look if it's better now... |
* @throws IOException If fails | ||
* @checkstyle ExecutableStatementCountCheck (2 lines) | ||
*/ | ||
private void copy(final WritableByteChannel target, | ||
final byte[] boundary) throws IOException { | ||
final byte[] boundary, | ||
final ReadableByteChannel body) throws IOException { |
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.
@dalifreire you can put body
in the previous line, and leave only throws in this one
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.
@krzyk Done! :)
@dalifreire one more comment |
@krzyk Could you review again? |
@krzyk Please, could you take a look if everything is right now? |
@dalifreire looks good |
@rultor merge pls |
@rultor merge |
@elenavolokhova review this ticket please, for compliance with our quality rules |
@rultor deploy now pls |
@davvd Looks good! |
@elenavolokhova thanks a lot :) |
@krzyk just added 10 mins to @elenavolokhova (for QA), payment ID is |
Issue #594 - Solving puzzle 558-afc1c081 in
src/main/java/org/takes/rq/RqMultipart.java:131-135