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

Fix potential NPE in test log statement #943

Merged
merged 1 commit into from Apr 24, 2019

Conversation

Projects
None yet
5 participants
@dhanji
Copy link
Collaborator

commented Apr 24, 2019

No description provided.

@mmihic

mmihic approved these changes Apr 24, 2019

@dhanji dhanji merged commit 2ac0efa into master Apr 24, 2019

1 of 2 checks passed

ci/circleci: java CircleCI is running your tests
Details
ci/circleci: node Your tests passed on CircleCI!
Details

@dhanji dhanji deleted the dhanji/fix-npe-test branch Apr 24, 2019

@@ -82,7 +82,7 @@ internal class MiskTestExtension : BeforeEachCallback, AfterEachCallback {
serviceManager.startAsync().awaitHealthy(60, TimeUnit.SECONDS)
} catch (e: IllegalStateException) {
// Unearth the root cause so we can see it in logs easily.
log.error("Startup failure -- ${e.cause!!.message}")

This comment has been minimized.

Copy link
@ryanhall07

ryanhall07 Apr 24, 2019

Collaborator

lol kotlin definitely removes NPEs

This comment has been minimized.

Copy link
@mightyguava

mightyguava Apr 24, 2019

Collaborator

the docs made me laugh:

The third option is for NPE-lovers: the not-null assertion operator (!!) converts any value to a non-null type and throws an exception if the value is null.

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.