DESCRIPTION

ctf: Hide internal functionalities of StringDefinition.

The StringDefinition should not expose its internals datastructure.
The StringBuffer is a temporary buffer used by read. Nothing outside
the 'read' method should ever play with this object.

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


COMMENTS

author: Brenden Conley
date: 2013-12-03 09:23:53.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2013-12-03 10:00:10.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Ivy Mitchell
date: 2013-12-03 19:59:46.000000000

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

I am going to guess that this will improve our memory footprint for traces with lots of different string events.

-------------------------------------
author: Jordon Obrien
date: 2013-12-03 20:22:35.000000000

Patch Set 1:

On a short term, this limit the stuff needed to be exposed to a "user" of the data-structure. I'll do the same cleanup on other files.

-------------------------------------
author: Braxton Mccarthy
date: 2013-12-03 22:30:57.000000000

Patch Set 1: Code-Review-1

(4 comments)

Good point. I also like "" (empty string) as the initial value, more than 'null' at least.

Small comments, those are things we should definitely document in the contributor's guide...

Line:9, /COMMIT_MSG -> internal data structures

Line:88, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/StringDefinitionTest.java -> the order of arguments in assert*() is counter-intuitive... it's (expected, actual). Technically the 'result' variables should always be second.

Line:37, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/StringDefinition.java -> We're trying to uniformize the way fields are called throughout the project, to always prefix them with 'f' so here it should become 'fString' or 'fValue'. ...

Line:96, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/StringDefinition.java -> ... that way when accessing them from the class we won't need to use "this." for example
  fString = string
vs
  this.string = string

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