avandeursen opened a new pull request #720:
URL: https://github.com/apache/logging-log4j2/pull/720
This PR strengthens the test suite for the `StructuredDataLookup` class so
that it achieves full branch coverage. The corner cases revealed the problem
that a lookup of a null key with a correct event led to a null pointer
exception. This is inconsistent with the javadoc ("can be null") and the other
lookup classes.
The PR fixes the null pointer exception for the `key` by essentially
replacing `key.equals("id")` by `"id".equals(key)`, in two places.
It also introduces explicit constants for the string literals "id" and
"type".
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]