Skip to content

Fix handling null messages during timeout evaluation.#1503

Open
OlgaMaciaszek wants to merge 1 commit intoNetflix:masterfrom
OlgaMaciaszek:fix-handling-null-messages
Open

Fix handling null messages during timeout evaluation.#1503
OlgaMaciaszek wants to merge 1 commit intoNetflix:masterfrom
OlgaMaciaszek:fix-handling-null-messages

Conversation

@OlgaMaciaszek
Copy link
Contributor

We are getting NPEs for certain scenarios over at Spring Cloud Netflix due to lack of handling of null exception messages. That's what gets logged:

java.lang.NullPointerException: Cannot invoke "String.toLowerCase()" because the return value of "java.lang.Throwable.getMessage()" is null
	at com.netflix.eureka.cluster.ReplicationTaskProcessor.maybeReadTimeOut(ReplicationTaskProcessor.java:196) ~[eureka-core-2.0.0.jar:2.0.0]
	at com.netflix.eureka.cluster.ReplicationTaskProcessor.process(ReplicationTaskProcessor.java:95) ~[eureka-core-2.0.0.jar:2.0.0]
	at com.netflix.eureka.util.batcher.TaskExecutors$BatchWorkerRunnable.run(TaskExecutors.java:190) ~[eureka-core-2.0.0.jar:2.0.0]
	at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

Since I've seen AssertJ was already being used in the project, I have added it to the module where I've made modifications. While at it, have also upgraded the AssertJ version.

If you accept this PR, could you also merge this change into 2.x?

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.

2 participants