DESCRIPTION

TMF: Improve the serialization of trace synchronization

Made some fields transient, so they are not serialized and initialize the
transient fields in the readObject method. Also added serialization unit tests.

Change-Id: I103b01b36efa66d27c37afba35935e415f4f0cc4
Signed-off-by: Aryana Jones xxx@xxx.xxx


COMMENTS

author: Annalise Jimenez
date: 2014-09-02 19:14:06.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2014-09-02 19:31:42.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2014-09-02 19:41:20.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/8668/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2014-09-09 17:35:29.000000000

Patch Set 1: -Verified

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

-------------------------------------
author: Brenden Conley
date: 2014-09-09 18:11:22.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/8854/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2014-09-09 18:54:54.000000000

Patch Set 1: -Verified

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

-------------------------------------
author: Brenden Conley
date: 2014-09-09 20:01:16.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Braxton Mccarthy
date: 2014-09-12 20:39:08.000000000

Patch Set 1: Code-Review-1

That's a very good use of transient fields! (since you use Java's own serialization).

However the transient fields just be initialized to null. To indicate better that they can be "not initialized".

And from an organizational point of view, the field delcarations should be ordered like this in a class:

  public static final
  private static final
  private final
  private
  private transient

-------------------------------------
author: Braxton Mccarthy
date: 2014-09-12 20:39:41.000000000

Patch Set 1:

s/just be/should be

-------------------------------------
author: Annalise Jimenez
date: 2014-09-16 15:50:11.000000000

Patch Set 1:

> However the transient fields just be initialized to null. To indicate better that they can be "not initialized".

I'm not sure about that. They ARE initialized, whether in the constructor or in the readObject method. It is not a bad practice to do so and those fields are all internal anyway. Doing so avoids having to add null checks everywhere. What do you think?

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