This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.35k
stars
1.99k
forks
source link
java.lang.NullPointerException when application properties with null value are present #41199
In a new edge case we are forwarding AMQP messages from another AMQP broker to event hub. The source allows application properties with a value of null. When this occurs, the code linked below throws a null pointer exception because there is no null checking in the sizeof call for the property values
In a new edge case we are forwarding AMQP messages from another AMQP broker to event hub. The source allows application properties with a value of null. When this occurs, the code linked below throws a null pointer exception because there is no null checking in the sizeof call for the property values
https://github.com/Azure/azure-sdk-for-java/blob/f0bb03edd0c46d198093d73ea932bb9f6d05cc98/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubMessageSerializer.java#L89
Reproduction:
Suggested Fix: