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

+tck #29 null checks fixed - null from ABQueue#poll means "timeout" #30

Merged
merged 1 commit into from
Apr 17, 2014

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Apr 17, 2014

Resolves #29 as well as realigns the code to always be "null, [some, none]".

env.flop(String.format("%s within %d ms", errorMsg, timeoutMillis));
return null; // keep compiler happy
} else {
return value;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Technically we could return value at the end sich we return null if it is null. (i.e. you don't need to keep the compiler happy)

  if (value == null) {
      env.flop(String.format("%s within %d ms", errorMsg, timeoutMillis));
   }

   return value;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

true, less noise +1

@rkuhn
Copy link
Member

rkuhn commented Apr 17, 2014

LGTM

@viktorklang
Copy link
Contributor

👍

rkuhn added a commit that referenced this pull request Apr 17, 2014
+tck #29 null checks fixed - `null` from ABQueue#poll means "timeout"
@rkuhn rkuhn merged commit 566a700 into reactive-streams:master Apr 17, 2014
@ktoso ktoso deleted the wip-29-fix-nullchecks branch November 25, 2014 10:32
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.

timeouts in TestEnvironment.Receptacle are reported as NPE
3 participants