Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350008

Summary: CDOTransactionImpl#getTransactionHandlers() throws NPE instead of returning an empty array
Product: [Modeling] EMF Reporter: Cyril Jaquier <cyril.jaquier>
Component: cdo.coreAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3    
Version: 4.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Fix NPE. Return an empty array instead of throwing a NPE.
none
Patch v2 none

Description Cyril Jaquier CLA 2011-06-22 03:43:39 EDT
Build Identifier: 4.0 GA

If transactionHandlers1 or transactionHandlers2 are empty (null in this case), org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.getTransactionHandlers() should return an empty array instead of throwing a NPE.

Reproducible: Always
Comment 1 Cyril Jaquier CLA 2011-06-22 03:48:10 EDT
Mmmhhh... I guess this method returned null instead of an empty array in previous versions.
Comment 2 Cyril Jaquier CLA 2011-06-22 04:02:00 EDT
Created attachment 198374 [details]
Fix NPE. Return an empty array instead of throwing a NPE.

My previous comment about transactionHandlers1 and transactionHandlers2 being null is wrong. It is transactionHandlersX.get() that returns null.
Comment 3 Cyril Jaquier CLA 2011-06-22 04:04:16 EDT
1) The number of lines that you added/changed is smaller than 250.
confirmed
2) You are the only author of these changed lines.
confirmed
3) You apply the EPL to these changed lines.
confirmed
Comment 4 Eike Stepper CLA 2011-06-23 04:27:52 EDT
Moving all open problem reports to 4.0
Comment 5 Eike Stepper CLA 2011-07-06 01:58:47 EDT
Created attachment 199161 [details]
Patch v2

This patch is now workspace rooted.
Comment 6 Eike Stepper CLA 2011-07-06 01:59:23 EDT
Committed revision 8608:
- trunk/plugins/org.eclipse.emf.cdo
Comment 7 Eike Stepper CLA 2011-07-06 01:59:41 EDT
Resolved for 4.1
Comment 8 Eike Stepper CLA 2012-09-21 07:17:13 EDT
Closing.