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

Add Nullable and Notnull annotations to IMap #15003

Merged
merged 2 commits into from Jun 11, 2019

Conversation

@mmedenjak
Copy link
Contributor

mmedenjak commented May 9, 2019

Also added missing checks and fixed some differences between member-side
and client-side behaviour.

Depends on: #14995

@mmedenjak mmedenjak added this to the 4.0 milestone May 9, 2019
@mmedenjak mmedenjak self-assigned this May 9, 2019
@mmedenjak mmedenjak force-pushed the mmedenjak:4.0-map-nullability branch from fc524a5 to de5e0a4 May 9, 2019
@Holmistr

This comment has been minimized.

Copy link
Collaborator

Holmistr commented May 16, 2019

run-lab-run

@mmedenjak mmedenjak requested a review from ahmetmircik May 23, 2019
long leaseTimeInMillis = getTimeInMillis(leaseTime, leaseTimeunit);
public boolean tryLock(NodeEngine nodeEngine, Data key,
long timeout, @Nullable TimeUnit timeunit,
long leaseTime, @Nullable TimeUnit leaseTimeunit) throws InterruptedException {

This comment has been minimized.

Copy link
@ahmetmircik

ahmetmircik May 27, 2019

Member

shouldn't these be @Nonnull instead of @Nullable TimeUnit timeunit? If you use this version of tryLock, you must provide non-null timeouts?

This comment has been minimized.

Copy link
@mmedenjak

mmedenjak Jun 4, 2019

Author Contributor

I was a bit surprised myself but seems like the default is always defaulted to milliseconds by using this method. Which is why I added @Nullable. Same for methods on IMap.

@ahmetmircik

This comment has been minimized.

Copy link
Member

ahmetmircik commented May 27, 2019

Prefer to see only new annotations development, now we also have lots of java-8 upgrader code changes. This makes hard to see actual changes that this PR introduces.

@mmedenjak mmedenjak force-pushed the mmedenjak:4.0-map-nullability branch from de5e0a4 to f638a92 Jun 4, 2019
@mmedenjak

This comment has been minimized.

Copy link
Contributor Author

mmedenjak commented Jun 4, 2019

@ahmetmircik most of the JDK8 changes were from a dependent PR which has now been merged so this one is rebased and should be much simpler to review. The changes are now limited to formatting, small javadoc cleanup, adding annotations and precondition checks. Please take another look.

@mmedenjak mmedenjak force-pushed the mmedenjak:4.0-map-nullability branch from f638a92 to bc76db5 Jun 11, 2019
Matko Medenjak added 2 commits Jun 4, 2019
Also added missing checks and fixed some differences between member-side
and client-side behaviour.
Matko Medenjak
@mmedenjak mmedenjak force-pushed the mmedenjak:4.0-map-nullability branch from bc76db5 to c2d8310 Jun 11, 2019
@mmedenjak

This comment has been minimized.

Copy link
Contributor Author

mmedenjak commented Jun 11, 2019

Merging, thanks for the reviews @ahmetmircik @pveentjer . The remaining inconsistent behaviour of addEntryListener between client and member in regards to the key nullability will be addressed in a separate PR.

@mmedenjak mmedenjak merged commit f532e93 into hazelcast:master Jun 11, 2019
1 check passed
1 check passed
default Test PASSed.
Details
@mmedenjak mmedenjak deleted the mmedenjak:4.0-map-nullability branch Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.