Update sonarqube findings

This commit is contained in:
2023-07-01 15:05:47 -04:00
parent 10d395d3a0
commit 5c30e7d434
16 changed files with 37 additions and 37 deletions

View File

@@ -37,7 +37,7 @@ public class Problem11 extends Problem{
//Variables
//Static variables
//This is the grid of numbers that we will be working with
protected static String FILE_NAME = "files/Problem11Grid.txt";
protected static String fileName = "files/Problem11Grid.txt";
protected static ArrayList<List<Integer>> grid;
//Instance variables
protected List<Integer> greatestProduct; //Holds the largest product we have found so far
@@ -50,11 +50,11 @@ public class Problem11 extends Problem{
}
//Operational functions
//Read numbers from file into grid
private void readFile(){
private static void readFile(){
if(grid != null){
return;
}
File file = new File(FILE_NAME);
File file = new File(fileName);
if(file.exists()){
try{
List<String> lines = Files.readAllLines(file.toPath());