DESCRIPTION

ctf: BitBuffer.java api overhaul

* Now 3 getters are public: get(length, extendSign), getInt(), and getLong().
* No longer throws runtime exceptions, instead throws CTFReaderExceptions

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


COMMENTS

author: Ivy Mitchell
date: 2013-11-27 16:34:51.000000000

Uploaded patch set 8.

-------------------------------------
author: Brenden Conley
date: 2013-11-27 16:34:57.000000000

Patch Set 8:

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

-------------------------------------
author: Ivy Mitchell
date: 2013-11-27 16:35:32.000000000

Patch Set 8:

I have cleaned up the test cases a bit.

-------------------------------------
author: Jordon Obrien
date: 2013-11-27 16:39:11.000000000

Patch Set 8: Code-Review+1

I read the core of the modification, and it's fine for me.
For the exceptions, I'll let somebody with more visibility at large than me review the code.

-------------------------------------
author: Ivy Mitchell
date: 2013-11-27 17:19:26.000000000

Patch Set 8:

I have finished benchmarking the patch, the performance is similar to the previous version.

-------------------------------------
author: Brenden Conley
date: 2013-11-27 17:20:26.000000000

Patch Set 8: Verified+1

Build Successful 

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

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-27 19:19:58.000000000

Patch Set 8: Code-Review-1

(12 comments)

Looks good, some comments. It doesn't apply cleanly on latest lttng-luna too ; you should always rebase to the latest head when pushing a new patchset (especially if one of the previous comments was "please rebase to the lastest lttng-luna").

Line:128, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/Definition.java -> Mention what conditions can trigger this exception

Line:60, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/IntegerEndiannessTest.java -> Multi-line comments/javadoc should be

  /**
   * like
   * this
   */

Line:102, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> The Javadoc for tests doesn't really matter, but here this is the public API, and will show up in the tooltips, HTML doc, etc. It should be more descriptive than "error".

Line:137, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> remove empty line

Line:175, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> more descriptionz

Line:199, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> guarantee?

What does the "A--" mean here?

Line:365, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> description

Line:367, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> since the get() methods return a long now, should the put() methods take a long for value?

Line:108, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/FloatDefinition.java -> can't this operation be done with get(64, false) now?

Line:226, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> it's not getLong(int), but getLong().

Those Javadoc stubs from CodePro are sorely uninformative... You can mention how each test is different ("Run the getLong() method at position 0", "Run the getLong() method at position 7" etc.)

Line:501, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> It's not an error in this case!

Line:122, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/IntegerDefinition.java -> it's available now!

In fact I think the else {} clause should be able to handle every case now, no?

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-27 19:22:10.000000000

Patch Set 8:

(1 comment)

Line:122, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/IntegerDefinition.java -> Oh it's fixed in the subsequent patch, nevermind!

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