style: include DLS_DEAD_LOCAL_STORE (#5276)

This commit is contained in:
Piotr Idzik 2024-07-05 21:52:54 +02:00 committed by GitHub
parent 26b4b82949
commit 96e59e063a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 9 deletions

View File

@ -65,9 +65,6 @@
<Match>
<Bug pattern="UWF_UNWRITTEN_FIELD" />
</Match>
<Match>
<Bug pattern="DLS_DEAD_LOCAL_STORE" />
</Match>
<Match>
<Bug pattern="UWF_NULL_FIELD" />
</Match>

View File

@ -7,7 +7,6 @@ public final class Gaussian {
}
public static ArrayList<Double> gaussian(int matSize, ArrayList<Double> matrix) {
ArrayList<Double> answerArray = new ArrayList<Double>();
int i;
int j = 0;
@ -22,8 +21,7 @@ public final class Gaussian {
}
mat = gaussianElimination(matSize, i, mat);
answerArray = valueOfGaussian(matSize, x, mat);
return answerArray;
return valueOfGaussian(matSize, x, mat);
}
// Perform Gaussian elimination

View File

@ -12,7 +12,6 @@ public class GaussianTest {
@Test
void passTest1() {
ArrayList<Double> list = new ArrayList<Double>();
ArrayList<Double> gaussian = new ArrayList<Double>();
ArrayList<Double> answer = new ArrayList<Double>();
answer.add(0.0);
answer.add(1.0);
@ -24,8 +23,7 @@ public class GaussianTest {
list.add(2.0);
list.add(1.0);
list.add(1.0);
gaussian = gaussian(matrixSize, list);
assertEquals(answer, gaussian);
assertEquals(answer, gaussian(matrixSize, list));
}
}