-
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
Made RqMultipart.Base delete its temporary files as soon as possible. #318
Conversation
@Bertram25 Thanks, let me find someone who can review this pull request |
@pinaf it's yours, please review |
* | ||
* @author Yegor Bugayenko (yegor@teamed.io) | ||
* @version $Id$ | ||
* @since 0.16 |
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.
@Bertram25 0.21 here
@Bertram25 3 comments above. Also, the test you added does not test
|
@pinaf Thanks a lot for your review. :)
I adapted the version in the two newly created files.
Fixed.
Fixed. Thanks for the hint.
Actually, as the test was indeed about
The problem is I cannot know which temporary file is created as its name is random. Best regards, |
|
||
/** | ||
* Test case for {@link TempInputStream}. | ||
* @author Yegor Bugayenko (yegor@teamed.io) |
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.
@Bertram25 you should be the author here
@Bertram25 thanks 2 comments |
@pinaf Fixes done. Thanks for the new review. :) |
@rultor merge |
* | ||
* <p>All implementations of this interface must be immutable and thread-safe. | ||
* | ||
* @author Yegor Bugayenko (yegor@teamed.io) |
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.
@Bertram25 I'm not the author of it :)
@Bertram25 a few comments from me |
@yegor256 Hey, thanks for the code review. :)
Fixed. (At first and some time ago already, I assumed we devs were to give the code away, hence the given authorship.)
Here, I encapsulated the origin Also, note that you're doing the exact same thing in If you prefer, I can have a go at extending Best regards, |
@yegor256 I'll rebase as the PR has become non mergeable. |
…dies are closed. For yegor256#254 I thus added a decorator to InputStream to permit deletion of the temp file when calling close() as advised by @dmzaytsev Thanks to @yegor256 and @dmzaytsev for the hints.
59ae3ae
to
4c26466
Compare
81c8f91
to
0641abc
Compare
@Bertram25 you could just merge with master manually instead of rebasing |
@pinaf Ok, most organizations usually prefer rebasing but I'll know I can just merge the next time. Thanks. |
@Bertram25 what's the status here? |
@pinaf Hi, @yegor256 asked me why I used encapsulation and extension of the same class I answered I was extending the Thus, IMHO, the code is good, but if @yegor256 still would like a change, I can extend CapInputStream instead and drop the encapsulation, while I still do think the current implementation is more extensible. So, I'm still waiting for @yegor256 's decision here. Regards, |
@Bertram25 thanks! @yegor256 please advise |
@yegor256 ping |
@yegor256 is this acceptable? |
@Bertram25 implementation of InputStream stream = new CapInputStream(
new ByteArrayInputStream(new byte[] {1, 2, 3}),
3
);
stream.skip(1);
assert stream.read() == 2; Thus, I'm suggesting to submit a bug about We should NOT encapsulate |
@Bertram25 ping |
@Bertram25 please close the issue |
@yegor256 do you mind closing this issue? |
@Bertram25 @pinaf I'm closing it, it's too old |
@yegor256 why did you mark it as invalid? |
@pinaf my bad, I thought it's a ticket. removing the label now |
@yegor256 nothing yet :( |
@yegor256 could you please take a look at why I didn't get paid? |
@yegor256 I thought CRs were paid regardless of a merge. If this policy was changed please let me know so I don't have to bug you about payment. |
@pinaf no changes in the policy, it's just our internal problem, sorry about it |
@yegor256 it's cool. thank you. |
For #254
I thus added a decorator to InputStream to permit deletion of the temp file
when calling close() as advised by @dmzaytsev
Thanks to @yegor256 and @dmzaytsev for the hints.
I also added a test to the new
TempInputStream
class to actually test the change.