DataDomain instantiates with null EventManager
----------------------------------------------

                 Key: CAY-871
                 URL: https://issues.apache.org/cayenne/browse/CAY-871
             Project: Cayenne
          Issue Type: Bug
          Components: Cayenne Core Library
    Affects Versions: 2.0 [STABLE]
         Environment: MacOSX 10.4, Java5, Cayenne 2.0.2
            Reporter: Emilian Bold
            Assignee: Andrus Adamchik


DataDomain instantiates with an empty event manager which later leads to a NPE 
in DataRowStore.sendUpdateNotification.

This makes the bug look as if it's a serialization issue (see 
https://issues.apache.org/cayenne/browse/CAY-796) but actually all DataDomain 
expects is something like:

dataDomain.setEventManager(EventManager.getDefaultManager());

This seems quite confusing for an API client as, unless you actually listen for 
events, you don't care about the EventManager and expect it to be set 
beforehand.

Initializing DataDomain with the default manager which may be replaced at will 
via setEventManager seems like a better approach.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to