DESCRIPTION

ctf: BitBuffer.java api overhaul

* Now 3 getters are public: get(length, extendSign), getInt(), and getLong().

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


COMMENTS

author: Braxton Mccarthy
date: 2013-11-28 23:40:57.000000000

Uploaded patch set 14.

-------------------------------------
author: Brenden Conley
date: 2013-11-28 23:43:37.000000000

Patch Set 14:

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

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-28 23:54:33.000000000

Patch Set 14:

Rebased on top of https://git.eclipse.org/r/#/c/19091/

-------------------------------------
author: Brenden Conley
date: 2013-11-29 00:13:17.000000000

Patch Set 14: Verified+1

Build Successful 

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

-------------------------------------
author: Jordon Obrien
date: 2013-11-29 03:33:33.000000000

Patch Set 14:

(5 comments)

moar nits.

Line:197, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> where is the assert?

Line:215, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> where is the assert?

Line:106, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/FloatDefinition.java -> why not using getLong here instead of 2x getInt and merge it.
Could be an other commit. up to you.

Line:151, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> this cast is already done on line 147.
I prefer it here, but up to you, and removed from line 147.
But up to you.

Line:152, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> alex told me to remove extra ( .., )

-------------------------------------
author: Ivy Mitchell
date: 2013-11-29 14:26:58.000000000

Patch Set 14:

(5 comments)

I have replied to Etienne's comments.

Line:189, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> This is an expected exception.

Line:197, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> The code does not require an assert as it is expecting an exception. If it does not throw an exception of the type CTFReaderException, it fails.

Line:215, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> Please see the above comments. Thank you for raising this point though, it allows the intent to be clearer and better documented.

Line:106, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/FloatDefinition.java -> This was planned as an other commit. I will do so in the very near future.

Line:151, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> That is a good point, if I put it on the top, would the compiler be able to better optimize this?

-------------------------------------
author: Jordon Obrien
date: 2013-11-29 14:55:11.000000000

Patch Set 14:

(4 comments)

thanks for the information.

Line:197, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> oki, I didn't know the way your unittest works.
Thank for the info.

Line:215, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> ditto.

Line:106, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/FloatDefinition.java -> ack.

Line:151, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> In this case, think about "readability" only.

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-29 22:01:58.000000000

Patch Set 14:

(2 comments)

Line:197, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> There should be a comment just before indicating this is the line that should throw the exception though.

I'll go over this file in a separate commit, it could use some cleanup.

Line:152, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> No I actually prefer with *more* parenthesis ;)

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