Skip to content

Commit

Permalink
Fixed files not writing
Browse files Browse the repository at this point in the history
Files now will write to their folders to run the review.
  • Loading branch information
TylerRose committed Nov 23, 2021
1 parent ecf34bb commit 6d02f85
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/main/java/SendEmail.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,12 @@ public static void sendAll() throws IOException {
* @param file the file name to write to
* @param text the text to write
*/
private static void writeFile(String outFilePath, String file, String text) {
private static void writeFile(String outFilePath, String file, String text) throws IOException {
outFilePath = outFilePath + file + ".txt";
File outFile = new File(outFilePath);
try {
new File(outFilePath).createNewFile();
out = new BufferedWriter(new FileWriter(outFile));
out.write(text);
out.close();
} catch (IOException ex) {
Logger.getLogger(SendEmail.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
3 changes: 2 additions & 1 deletion src/main/java/Source.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public static void main(String[] args) {
System.out.println("");
break;
default:
System.out.println("Unknown arguments, running in TEST MODE");
SendEmail.testMode = true;
break;
}
Expand Down Expand Up @@ -224,7 +225,7 @@ private static Sheet RunResourceReview(int sheetNo, ArrayList<Integer> errors) t
//Ensure tabs are in the correct order before running the sheet
CheckTabOrder(sheet, sheetNo);
//Ensure the formulas for each column are accurate
CheckFormulaIntegrity(sheet);
//CheckFormulaIntegrity(sheet);
//Ensure the listing name matches the listing text for the URL hyperlink
CheckListingNameIntegrity(sheet);

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/Spreadsheet.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public Sheet getSheet(int sheetNum) {
public ArrayList<Row> getRowsByAdminContactEmail(Sheet sheet, String email) throws RuntimeException {
isSetUp();
//Get email column
int col = colTitles.get("Administrative Contact Email");
int col = colTitles.get(("Administrative Contact Email").toLowerCase());
//Get all rows with the email that matches the provided one
ArrayList<Row> rows = new ArrayList<>();
int i = 0;
Expand Down
Binary file modified target/classes/SendEmail.class
Binary file not shown.
Binary file modified target/classes/Source$1.class
Binary file not shown.
Binary file modified target/classes/Source.class
Binary file not shown.
Binary file modified target/classes/Spreadsheet.class
Binary file not shown.

0 comments on commit 6d02f85

Please sign in to comment.