DESCRIPTION

ctf: replace HashMaps with ArrayLists for EventDeclaration storage

Parser no longer supports events with IDs larger than Integer.MAX_VALUE

Change-Id: I088943c5a041f16638cb89b832ab79f8ef9c1d76
Signed-off-by: Ivy Mitchell xxx@xxx.xxx


COMMENTS

author: Gerrit Code Review
date: 2014-08-14 00:47:25.000000000

The change could not be merged due to a path conflict.

Please rebase the change locally and upload the rebased commit for review.

-------------------------------------
author: Ivy Mitchell
date: 2014-08-14 16:43:36.000000000

Uploaded patch set 19.

-------------------------------------
author: Braxton Mccarthy
date: 2014-08-14 16:57:11.000000000

Patch Set 19: -Code-Review

-------------------------------------
author: Braxton Mccarthy
date: 2014-08-14 17:02:12.000000000

Patch Set 19: Code-Review+1

Looks good.

We have a nice example here of why it's better to use

  Collection<E> getAllTheThings();
  E getOneThing(int id);

instead of exposing a Map or List directly, this allows us to change the underlying implementation without breaking the API!

-------------------------------------
author: Brenden Conley
date: 2014-08-14 17:33:42.000000000

Patch Set 19:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/8272/

-------------------------------------
author: Luciana Barry
date: 2014-08-14 17:53:52.000000000

Patch Set 19: Code-Review-1

(2 comments)

Line:248, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStream.java -> This is confusing for nothing. Nowhere does it say that the index of the list is the event id. So it's unnecessary to say that it's not.

Line:262, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStream.java -> at a given index > for a given event id

and it can be null, right?

Users of this method shouldn't know the highest stored event id, so it's a bit strange that a bogus id below the max returns null and a bogus id above the max gives an array index out of bounds exception. The behavior should be the same.

-------------------------------------
author: Brenden Conley
date: 2014-08-14 18:24:38.000000000

Patch Set 19: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/8272/ : SUCCESS

-------------------------------------
author: Braxton Mccarthy
date: 2014-08-14 20:28:55.000000000

Patch Set 19: Code-Review-1

Good points Patrick, I'll update the patch.

-------------------------------------
