DESCRIPTION

ctf: will not allow out of bounds positioning of the bitbuffer

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


COMMENTS

author: Ivy Mitchell
date: 2013-11-29 23:17:04.000000000

Uploaded patch set 3.

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-30 00:27:30.000000000

Patch Set 3: Code-Review-1

(8 comments)

Small comments.

I'd expect this to reduce the number of failures in CtfTestSuiteTests, but it doesn't, is that normal?

Line:7, /COMMIT_MSG -> Use present tense:
Do not allow out-of-bounds positioning of the BitBuffer

People tend to use the past tense, but future? You don't see that often!

Line:38, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferTest.java -> If it really cannot happen, you can try-catch it in the test and fail() in the catch{}

Line:43, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> We import it already, no need for the java.nio part.

Line:48, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> Don't make parameters final, we discussed this already.

Line:142, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/Definition.java -> capital H

Line:87, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> What exception? To somebody reading the new version, this is confusing, this method doesn't throw any.

Line:597, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> You don't need "this." here, it makes the code heavier

Line:640, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> here too, "the exception" is unclear what it refers to.

-------------------------------------
author: Brenden Conley
date: 2013-11-30 02:32:56.000000000

Patch Set 3:

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

-------------------------------------
author: Brenden Conley
date: 2013-11-30 03:14:32.000000000

Patch Set 3: Verified+1

Build Successful 

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

-------------------------------------
author: Ivy Mitchell
date: 2013-12-02 15:33:44.000000000

Patch Set 3:

(1 comment)

Line:38, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferTest.java -> I believe it is the same thing and the code looks cleaner this way.

-------------------------------------
author: Braxton Mccarthy
date: 2013-12-02 21:44:23.000000000

Patch Set 3:

(1 comment)

Line:38, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferTest.java -> Javadoc looks cleaner without xxx@xxx.xxx though ;)

But if it can potentially happen, it's a bit easier to have the method throw it. That way in the unit test report you get the exception and the call stack.

-------------------------------------
author: Gerrit Code Review
date: 2013-12-02 22:44:15.000000000

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

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

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