-
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
#666: Refactored the class RqMtBase to reduce the coupling #668
Conversation
@essobedo Thanks, I will find someone to review this PR soon |
@dmzaytsev review this one,please |
RqTempTest.class.getName(), | ||
".tmp" | ||
); | ||
final BufferedWriter out = new BufferedWriter(new FileWriter(file)); |
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.
@essobedo I think it can be implemented shortly as Takes moved to java 7
Files.write(
file.toPath(), Arrays.asList("Temp file deletion test"), StandardCharsets.UTF_8
);
@essobedo please see my comment |
@dmzaytsev done, thx for the feedback |
@essobedo thanks |
@rultor merge |
@dmzaytsev Thanks for your request. @yegor256 Please confirm this. |
@yegor256 please check |
@yegor256 ping |
@yegor256 Please confirm |
@yegor256 please |
@@ -140,15 +129,15 @@ public RqMtBase(final Request req) throws IOException { | |||
if (values == null) { | |||
iter = new VerboseIterable<>( | |||
Collections.<Request>emptyList(), | |||
new Sprintf( | |||
String.format( |
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.
@essobedo what is the reason for this change?
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.
@yegor256 I needed to reduce the coupling, and as I tested the result of both and got the same result, I believed that I could replace it. Why is it not correct? What did I miss? What does Sprintf that String.format doesn't do?
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.
@essobedo String.format()
will print the string right here, while Sprintf
will print only when it's needed. in most cases - never.
@essobedo some questions from me above |
@yegor256 I provided the answer, please check it |
@yegor256 please check my answers |
@yegor256 please check my answer |
@yegor256 ping |
@@ -45,7 +45,7 @@ | |||
* @since 0.1 | |||
*/ | |||
@EqualsAndHashCode(callSuper = true) | |||
public final class RqLive extends RqWrap { | |||
public class RqLive extends RqWrap { |
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.
@essobedo please excuse me for the delay. one more comment above |
@yegor256 fixed, please check again |
/** | ||
* Creates a {@code RqTemp} with the specified temporary file. | ||
* @param file The temporary that will be automatically deleted when the | ||
* body of the request will be closed. |
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.
@essobedo I don't see where this file is actually deleted... do I miss something?
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.
@essobedo ignore me
@essobedo see my concern above |
@yegor256 RqTemp is no more public and has been moved into the multipart package, please check again |
@rultor try to merge |
@elenavolokhova please, check this issue for QA compliance, as per par.24 |
@rultor please deploy |
@dmzaytsev
Only one issue was found during review. |
@elenavolokhova I confirm |
@davvd Quality is acceptable here. |
@elenavolokhova thank you, let's try to make it "good" next time |
@dmzaytsev added 10 mins to @elenavolokhova, for QA review, payment code is thanks, paid, 20 mins to your account, payment ID is you're getting extra minutes here (c=5) +20 added to your rating, at the moment it is: +1304 |
Fix for #666
The goal of this PR is to refactor the class RqMtBase in order to reduce the overall coupling pf this class