Apama 10.3 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in Java | Overview of Apama JMon Applications | About event types | Non-null values for non-primitive event field types
Non-null values for non-primitive event field types
When the correlator creates an event to pass to the JMon code, it ensures that all fields of a non-primitive type have a non-null value. Note that this is different from the Java default, which is to allow null values for non-primitive types.
The com.apama.jmon.Event default constructor uses reflection to initialize non-primitive null fields with the following values:
*sequence — an empty array of the specified type.
*dictionary — an empty java.util.HashMap object.
*string — an empty java.lang.String object.
*event — a default construction of the event, with recursive initialization for any of its non-primitive fields that have null values.
In your application, if you explicitly assign a null value to a non-primitive event field, and your application tries to emit, enqueue, or route that event, the correlator logs an error and terminates your application.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.