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: Ivy Mitchell
date: 2014-08-13 21:03:26.000000000

Uploaded patch set 17.

-------------------------------------
author: Braxton Mccarthy
date: 2014-08-13 21:06:18.000000000

Patch Set 17: Code-Review+1

Ok looks good, don't touch it anymore! :P

-------------------------------------
author: Brenden Conley
date: 2014-08-13 23:12:46.000000000

Patch Set 17:

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

-------------------------------------
author: Brenden Conley
date: 2014-08-14 00:04:43.000000000

Patch Set 17: Verified+1

Build Successful 

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

-------------------------------------
author: Ivy Mitchell
date: 2014-08-14 00:47:23.000000000

Patch Set 17: Code-Review+2

-------------------------------------
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: Braxton Mccarthy
date: 2014-08-14 15:44:00.000000000

Patch Set 17: Code-Review-2

(3 comments)

Couple more comments following those on the previous patch. Another case of exposing List here when it's not needed...

I think it's worth taking the time to make a clean API here, the freeze for 3.1 is around the corner so we won't be able to change it after that.

(-2 to show up over the +2)

Line:252, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStream.java -> Is this really needed? What can you do with this that you cannot do with get(int id) ?

If your answer is: "Well you can iterate on them, dingus!", then I'll say you should return an Iterable here instead, and not expose the underlying data structure (this will allow you to change the underlying implementation to TreeMap etc. without breaking this API).

Line:267, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStream.java -> Don't call this "index", it's an id. The users don't have to know what the underlying implementation is.

Line:351, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStream.java -> I feel this would be better as a static method (pass the ArrayList in parameter). This will make it more obvious that this is a utility method specific to the ArrayList implementation.

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