Skip to content

Commit

Permalink
style: include DLS_DEAD_LOCAL_STORE (#5276)
Browse files Browse the repository at this point in the history
  • Loading branch information
vil02 authored Jul 5, 2024
1 parent 26b4b82 commit 96e59e0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
3 changes: 0 additions & 3 deletions spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/thealgorithms/maths/Gaussian.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ private Gaussian() {
}

public static ArrayList<Double> gaussian(int matSize, ArrayList<Double> matrix) {
ArrayList<Double> answerArray = new ArrayList<Double>();
int i;
int j = 0;

Expand All @@ -22,8 +21,7 @@ public static ArrayList<Double> gaussian(int matSize, ArrayList<Double> matrix)
}

mat = gaussianElimination(matSize, i, mat);
answerArray = valueOfGaussian(matSize, x, mat);
return answerArray;
return valueOfGaussian(matSize, x, mat);
}

// Perform Gaussian elimination
Expand Down
4 changes: 1 addition & 3 deletions src/test/java/com/thealgorithms/maths/GaussianTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -24,8 +23,7 @@ void passTest1() {
list.add(2.0);
list.add(1.0);
list.add(1.0);
gaussian = gaussian(matrixSize, list);

assertEquals(answer, gaussian);
assertEquals(answer, gaussian(matrixSize, list));
}
}

0 comments on commit 96e59e0

Please sign in to comment.