DESCRIPTION

[ctf] Fix coding style issues in BitBuffer.

Change-Id: I22fccc4e2ffee3bbf796e52b516b00f7fc5e31ac
Signed-off-by: Jordon Obrien xxx@xxx.xxx


COMMENTS

author: Jordon Obrien
date: 2013-11-22 06:01:19.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2013-11-22 07:35:50.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2013-11-22 08:10:57.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Bradyn Guerra
date: 2013-11-22 18:21:34.000000000

Patch Set 2: Code-Review+1

(2 comments)

Line:24, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> Part of the BitBuffer tests which test"S"

The "part" test"s".

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

-------------------------------------
author: Jordon Obrien
date: 2013-11-22 18:41:38.000000000

Patch Set 2:

(2 comments)

Thanks Francois.
Not sure of your point on the correction.
Please, correct me if I'm wrong.

Line:24, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> testS which <unit-test>
So, I think it's ok.

Line:139, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> Get the code smaller ease the reading.

-------------------------------------
author: Ivy Mitchell
date: 2013-11-22 19:13:10.000000000

Patch Set 2: Code-Review+2 IP-Clean+1

A pity, I kept bit buffet for a while on purpose. Made me laugh. I will verify soon

-------------------------------------
author: Ivy Mitchell
date: 2013-11-22 20:22:48.000000000

Patch Set 2: Code-Review-1

(1 comment)

Quick question in the comments, the -1 is provisional until a reply is provided

Line:122, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> why are you removing this?

-------------------------------------
author: Jordon Obrien
date: 2013-11-22 21:10:25.000000000

Patch Set 2:

(1 comment)

Please, read again the diff.
You'll see I didn't remove it.
I just flip the two "if" to fix a bug.

Line:122, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> It's not removed. I swap the two test.
It's valid to read zero "bits" at the end of the file.
Thus, I fixed a bug.

-------------------------------------
author: Ivy Mitchell
date: 2013-11-22 22:37:30.000000000

Patch Set 2: Verified+1

(1 comment)

Looks good, I prefer splitting style and function though... could you change the commit message to say "Fix bug with 0 byte data stream and coding style issues in BitBuffer." please? I will gladly merge it when that is done.

Line:122, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> Very nice! but then this is more imporant than coding style and the commit message should reflect it

-------------------------------------
author: Jordon Obrien
date: 2013-11-23 06:36:57.000000000

Patch Set 2:

(1 comment)

My goal was to take time this week-end to take a look to those files and see where optimization are possible.

I did the effort to do a first pass of cleanup to your code and keep it in a separate patch. This way I can focus on the behavior of the code without worrying about all those nits.

You should use the code review process as a tools to improve the productivity and the quality of the comunity, and reach a larger audience. Not to use it as pending queue of patches to be processed whenever you are in the mood.

Comunity grows on the mutual respect of members. And raising the quality is by being picky.... on things that matter.

Line:122, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/io/BitBuffer.java -> It could be important, if the bug is a real bug.
It is not defined by the spec, and this behavior seems better for me. (A unittest will come at the next hackathon).
It's a corner case for pedantic unittest that will never happen in the field.

Thus, spending time on writing unittest to detect this kind of issue, or finding bug by code reviewing your code base, or finding performance issue of TMF is a better way of using my time than splitting commits.

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-23 08:01:39.000000000

Patch Set 2:

(1 comment)

Well Etienne that was a bit raw... but you have a point. We continually have a bunch of pending reviews, and could definitely improve our process. If the patch is good (and only if it's good, of course), then something like a minor change to the commit title could be done by the reviewer, instead of getting a -1 and adding more bureaucratic delay.

Line:24, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/io/BitBufferIntTest.java -> It's the verb "test", but subject could be either "part" or "BitBuffer tests", so both work... guess we'll never know the intended meaning!

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