Just a general code cleanup

This commit is contained in:
Keith Armstrong 2025-01-16 07:48:04 -05:00
parent f20c999933
commit 2a233bc5d3
4 changed files with 14 additions and 15 deletions

View File

@ -16,7 +16,7 @@ public class fileProcessor {
public static String readFirstLine(String thisFile) throws IOException {
File file = new File(thisFile);
Boolean isValid = validFile(thisFile);
boolean isValid = validFile(thisFile);
if ( !isValid )
{

View File

@ -2,13 +2,8 @@ package com.belkast.soap;
import com.beust.jcommander.Parameter;
import java.util.ArrayList;
import java.util.List;
public class jCommanderArgs {
@Parameter
private List<String> parameters = new ArrayList<>();
public class jCommanderArgs
{
@Parameter(names = "--props" , description = "Location of the properties file", validateWith = jCommanderVerifyFile.class)
public String props;

View File

@ -19,6 +19,10 @@ public class propertyProcessor
{
propertyValue = thisDefault;
}
else
{
propertyValue = propertyValue.trim();
}
}
catch (Exception e)
{

View File

@ -23,7 +23,7 @@ public class userVerify
System.out.print(varPrompt);
varFileName = myObj.nextLine();
File thisFile = new File(varFileName);
Boolean isValidFile = fileProcessor.validFile(varFileName);
boolean isValidFile = fileProcessor.validFile(varFileName);
if ( thisFile.exists() && isValidFile )
{
break;
@ -31,7 +31,7 @@ public class userVerify
varPrompt = "\nThe CSV file does not exist or cannot be read!\nPlease enter the name of the CSV file to validate : ";
}
Boolean varUserBlockEmpty = false;
boolean varUserBlockEmpty = false;
HashMap<String, Boolean> valueMap = new HashMap();
valueMap.put("Y", true);
@ -73,9 +73,9 @@ public class userVerify
}
debugProcessor.writer(true, "");
}
boolean validfile = (!thisCSV.isEmpty());
boolean validFile = (!thisCSV.isEmpty());
debugProcessor.writer(true, "CSV file records : " + varIter);
debugProcessor.writer(true, "CSV file is valid : " + validfile);
debugProcessor.writer(true, "CSV file is valid : " + validFile);
System.out.println();
}
@ -92,8 +92,8 @@ public class userVerify
}
String exceptionReason = null;
Boolean failedOnException = false;
Boolean parsedCorrectly = false;
boolean failedOnException = false;
boolean parsedCorrectly = false;
long lineNum = 0;
while (!parsedCorrectly && !failedOnException) {
@ -133,7 +133,7 @@ public class userVerify
boolean isValid = record.isConsistent();
int thisSize = record.size();
String thisLine = Files.readAllLines(Paths.get(thisFile)).get(Math.toIntExact(lineNum - 1));
Boolean validValues = true;
boolean validValues = true;
if (isValid)
{