Developing Apama Applications > Developing Apama Applications in Java > Overview of Apama Java 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 Java 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 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.