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

#705 Add interfaces for MultiReader List/Set/Bag #719

Merged
merged 1 commit into from May 6, 2019

Conversation

canthonyl
Copy link
Contributor

hi please find this PR for #705

@donraab donraab requested a review from motlin May 3, 2019 03:23
Copy link
Contributor

@donraab donraab left a comment

Choose a reason for hiding this comment

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

Thank you for submitting this. This PR looks mostly good. Primarily changes requested on at since tags. A couple of questions on dependency additions in pom.xml as well.

Copy link
Contributor

@motlin motlin left a comment

Choose a reason for hiding this comment

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

LGTM overall. Would be interesting to get the group's thoughts on the interface hierarchy and bounded wildcards.

* @since 10.0.
*/
public interface MultiReaderBag<T>
extends MutableBag<T>
Copy link
Contributor

Choose a reason for hiding this comment

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

An interesting question is whether these should extend MutableBagIterable vs MutableBag, MutableSetIterable vs MutableSet. I suppose we could keep it as is and add the other interfaces only if we add other multi-reader implementations.

{
void withReadLockAndDelegate(Procedure<MutableBag<T>> procedure);

void withWriteLockAndDelegate(Procedure<MutableBag<T>> procedure);
Copy link
Contributor

Choose a reason for hiding this comment

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

All usages of Procedure should be generified. IntelliJ may show a warning and an auto-fix here in newish versions of IntelliJ. Specifically:

    void withReadLockAndDelegate(Procedure<? super MutableBag<T>> procedure);
    void withWriteLockAndDelegate(Procedure<? super MutableBag<T>> procedure);

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure about this actually. I realized this API is older and you just pulled it up to an interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, that is indeed what happened - I have now got my forked repo up to date now and corrected the above

Signed-off-by: canthonyl <cheung.yi.lung@gmail.com>
@donraab donraab merged commit 5a5f507 into eclipse:master May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants