Skip to content
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

Merged
merged 7 commits into from
May 3, 2016
Merged

#666: Refactored the class RqMtBase to reduce the coupling #668

merged 7 commits into from
May 3, 2016

Conversation

essobedo
Copy link
Contributor

Fix for #666

The goal of this PR is to refactor the class RqMtBase in order to reduce the overall coupling pf this class

@davvd
Copy link

davvd commented Apr 23, 2016

@essobedo Thanks, I will find someone to review this PR soon

@davvd
Copy link

davvd commented Apr 23, 2016

@dmzaytsev review this one,please

RqTempTest.class.getName(),
".tmp"
);
final BufferedWriter out = new BufferedWriter(new FileWriter(file));
Copy link
Contributor

@dmzaytsev dmzaytsev Apr 24, 2016

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
);

@dmzaytsev
Copy link
Contributor

@essobedo please see my comment

@essobedo
Copy link
Contributor Author

@dmzaytsev done, thx for the feedback

@dmzaytsev
Copy link
Contributor

@essobedo thanks

@dmzaytsev
Copy link
Contributor

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Apr 24, 2016

@rultor merge

@dmzaytsev Thanks for your request. @yegor256 Please confirm this.

@essobedo
Copy link
Contributor Author

@yegor256 please check

@essobedo
Copy link
Contributor Author

@yegor256 ping

@essobedo
Copy link
Contributor Author

@yegor256 Please confirm

@essobedo
Copy link
Contributor Author

@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(
Copy link
Owner

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?

Copy link
Contributor Author

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?

Copy link
Owner

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.

@yegor256
Copy link
Owner

@essobedo some questions from me above

@essobedo
Copy link
Contributor Author

@yegor256 I provided the answer, please check it

@essobedo
Copy link
Contributor Author

@yegor256 please check my answers

@essobedo
Copy link
Contributor Author

essobedo commented May 1, 2016

@yegor256 please check my answer

@essobedo
Copy link
Contributor Author

essobedo commented May 3, 2016

@yegor256 ping

@@ -45,7 +45,7 @@
* @since 0.1
*/
@EqualsAndHashCode(callSuper = true)
public final class RqLive extends RqWrap {
public class RqLive extends RqWrap {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yegor256
Copy link
Owner

yegor256 commented May 3, 2016

@essobedo please excuse me for the delay. one more comment above

@essobedo
Copy link
Contributor Author

essobedo commented May 3, 2016

@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.
Copy link
Owner

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?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@essobedo ignore me

@yegor256
Copy link
Owner

yegor256 commented May 3, 2016

@essobedo see my concern above

@essobedo
Copy link
Contributor Author

essobedo commented May 3, 2016

@yegor256 RqTemp is no more public and has been moved into the multipart package, please check again

@yegor256
Copy link
Owner

yegor256 commented May 3, 2016

@rultor try to merge

@rultor
Copy link
Collaborator

rultor commented May 3, 2016

@rultor try to merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit 86e34fd into yegor256:master May 3, 2016
@rultor
Copy link
Collaborator

rultor commented May 3, 2016

@rultor try to merge

@yegor256 Done! FYI, the full log is here (took me 16min)

@essobedo essobedo deleted the 666 branch May 3, 2016 20:10
@davvd
Copy link

davvd commented May 4, 2016

@elenavolokhova please, check this issue for QA compliance, as per par.24

@davvd
Copy link

davvd commented May 4, 2016

@rultor please deploy

@rultor
Copy link
Collaborator

rultor commented May 4, 2016

@rultor please deploy

@davvd OK, I'll try to deploy now. You can check the progress here

@rultor
Copy link
Collaborator

rultor commented May 4, 2016

@rultor please deploy

@davvd Done! FYI, the full log is here (took me 17min)

@elenavolokhova
Copy link

@dmzaytsev
According to our quality rules:

The code reviewer found at least three problems in the code.

Only one issue was found during review.
Please confirm that you will try to find at least three problems next time.

@dmzaytsev
Copy link
Contributor

@elenavolokhova I confirm

@elenavolokhova
Copy link

@davvd Quality is acceptable here.

@davvd
Copy link

davvd commented May 6, 2016

@davvd Quality is acceptable here.

@elenavolokhova thank you, let's try to make it "good" next time

@davvd
Copy link

davvd commented May 6, 2016

@dmzaytsev added 10 mins to @elenavolokhova, for QA review, payment code is 85775163

thanks, paid, 20 mins to your account, payment ID is 85775198, task took 241 hours and 33 mins to complete

you're getting extra minutes here (c=5)

+20 added to your rating, at the moment it is: +1304

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants