DESCRIPTION

TMF: Force getId() from IAnalysisModule to be NonNull

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


COMMENTS

author: Annalise Jimenez
date: 2014-03-10 21:14:52.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2014-03-10 21:14:58.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2014-03-10 21:57:20.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Kaeden Tapia
date: 2014-03-11 15:52:12.000000000

Patch Set 2:

I'll be looking at this.

-------------------------------------
author: Kaeden Tapia
date: 2014-03-11 18:47:44.000000000

Patch Set 2:

(1 comment)

Line:89, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAbstractAnalysisModule.java -> The id gets passed around to the StateSystem constructor but in the javadoc it mentions that this id should be unique. Should a better (unique) default value be used instead? Like the fully qualified class name?

-------------------------------------
author: Kaeden Tapia
date: 2014-03-11 22:45:22.000000000

Patch Set 2: Code-Review-1

-------------------------------------
author: Annalise Jimenez
date: 2014-03-12 14:53:21.000000000

Patch Set 2:

(1 comment)

Line:89, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAbstractAnalysisModule.java -> That was the case before too, and as Alex said back then... "oh well!" 

But indeed we should use something unique, though even with the qualified class name, the unicity is not guaranteed since it is possible to have many analysis modules of the same class. I'd say just add a random text after the underfined ID or the class name.

-------------------------------------
author: Kaeden Tapia
date: 2014-03-12 17:33:43.000000000

Patch Set 2:

(1 comment)

Line:89, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAbstractAnalysisModule.java -> I see. I don't think there will be a guarantee that it will be unique even if randomly generated, right? So maybe it's not worth doing. BTW, in which case can this be null? Both the extension point and the XML require that Id I think? If I understand correctly, this could be null if the module is created by other means. I'm debating whether or not to throw a NPE when that happens but maybe a less violent solution would be to log an error and return UNDEFINED_ID as it is done in this patch.

-------------------------------------
author: Annalise Jimenez
date: 2014-03-12 18:12:38.000000000

Patch Set 2:

(1 comment)

Line:89, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAbstractAnalysisModule.java -> I'd go for an Activator.logError() This case should not happen at user runtime, but might happen while developing, and of course all developers check their console log for errors, right?

-------------------------------------
author: Kaeden Tapia
date: 2014-03-12 18:18:15.000000000

Patch Set 2:

(1 comment)

Line:89, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAbstractAnalysisModule.java -> Sounds good!

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