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
3148 chRemote #3149
3148 chRemote #3149
Conversation
@maxonfjvipon please review. This test does not cover current vulnerability, however it protect us from thread-unsafety in future. |
/** | ||
* Hash of tag. | ||
* | ||
* @since 0.28.11 | ||
*/ | ||
public interface CommitHash { | ||
@FunctionalInterface |
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.
@levBagryansky why do we need it here?
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.
@maxonfjvipon I added it because this actually is a functional interface.
/** | ||
* Hash of tag. | ||
* | ||
* @since 0.28.11 | ||
*/ | ||
public interface CommitHash { | ||
@FunctionalInterface | ||
public interface CommitHash extends Scalar<String> { |
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.
@maxonfjvipon I inhereted it firstly because it has the same method so it really can be inherited. Also it allowed to write
Stream.generate(
() -> new ChRemote("0.23.19")
).limit(threads).collect(Collectors.toList())
and this is cool.
@yegor256 please take a look |
@rultor merge |
Closes #3148
PR-Codex overview
The focus of this PR is to refactor the
CommitHash
interface to extendScalar<String>
and make improvements to theChRemote
class for better performance and thread safety.Detailed summary
CommitHash
interface now extendsScalar<String>
ChRemote
ChRemoteTest
with new test method