Skip to content

Commit

Permalink
counters: Fix CounterStateProviderTest sonar issue
Browse files Browse the repository at this point in the history
Make this non-reused 'fSsb' field an actual local (only) variable.

Change-Id: I50d6af29d2a5a92e601c0141073f0ca9aaa79090
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/196398
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
  • Loading branch information
marco-miller committed Oct 18, 2022
1 parent 9694296 commit 300a365
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -47,7 +47,6 @@ public class CounterStateProviderTest {
private static final String COUNTER_FILE = "traces/counter_testTrace.xml";

private TmfXmlTraceStubNs fTrace;
private ITmfStateSystemBuilder fSsb;
private CounterStateProvider fStateProvider;

/**
Expand Down Expand Up @@ -79,8 +78,8 @@ public boolean isCumulative() {
// Create the state provider
fStateProvider = CounterStateProvider.create(trace);
IStateHistoryBackend backend = StateHistoryBackendFactory.createInMemoryBackend("CounterStateSystem", 0);
fSsb = StateSystemFactory.newStateSystem(backend);
fStateProvider.assignTargetStateSystem(fSsb);
ITmfStateSystemBuilder ssb = StateSystemFactory.newStateSystem(backend);
fStateProvider.assignTargetStateSystem(ssb);
fTrace = trace;
}

Expand Down

0 comments on commit 300a365

Please sign in to comment.