Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350008 - CDOTransactionImpl#getTransactionHandlers() throws NPE instead of returning an empty array
Summary: CDOTransactionImpl#getTransactionHandlers() throws NPE instead of returning a...
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-22 03:43 EDT by Cyril Jaquier CLA
Modified: 2012-09-21 07:17 EDT (History)
0 users

See Also:


Attachments
Fix NPE. Return an empty array instead of throwing a NPE. (1.45 KB, patch)
2011-06-22 04:02 EDT, Cyril Jaquier CLA
no flags Details | Diff
Patch v2 (1.55 KB, patch)
2011-07-06 01:58 EDT, Eike Stepper CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.