DESCRIPTION

Fix sonar violations

Violations such as duplicate literals, string to string,
anon inner length, collapsible if statements, etc..

Change-Id: I47ac5320bfead822bc1ac470a1a80094ac063edc
Signed-off-by: Tori Trevino xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2013-07-10 13:53:44.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/sandbox/job/linuxtools/2886/

-------------------------------------
author: Brenden Conley
date: 2013-07-10 14:10:22.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/sandbox/job/linuxtools/2886/ : SUCCESS

-------------------------------------
author: Octavio Lucero
date: 2013-07-11 20:51:46.000000000

Patch Set 1:

(6 comments)

Take a look at NLS.bind(...) to perform string substitution on message strings (as opposed to string concatenation).

Line:105, rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileElement.java -> String can be externalized.

Line:64, rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/SpecfileEditorPrepareSourcesActionDelegate.java -> String can be externalized.

Line:164, rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/SpecfileEditorPrepareSourcesActionDelegate.java -> String can be externalized.

Line:40, rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/DownloadJob.java -> The above two constants should be in all upper case.

Line:64, rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/SpecfileEditorDownloadSourcesActionDelegate.java -> String can be externalized.

Line:377, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statesystem/TmfStateSystemExplorer.java -> Did you mean to modify this lttng class?

-------------------------------------
author: Octavio Lucero
date: 2013-07-11 21:01:23.000000000

Patch Set 1:

(1 comment)

Line:7, /COMMIT_MSG -> It might be worth mentioning what plug-ins these fixes are for to avoid ambiguity in the commit logs.

-------------------------------------
author: Nathanael Holden
date: 2013-07-12 14:11:28.000000000

Patch Set 1:

(1 comment)

Line:377, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statesystem/TmfStateSystemExplorer.java -> The if statements could be combined, but the change made is not logically equivalent to the original statement. Since  (a && (b || c)) != (a && b || c). (Since these particular operators are left associative).

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