Update src/main/java/dev/sillyangel/calc/CalculatorHistory.java
All checks were successful
Build the Jar / build (push) Successful in 10s
All checks were successful
Build the Jar / build (push) Successful in 10s
This commit is contained in:
@@ -27,7 +27,7 @@ public class CalculatorHistory {
|
||||
* Initializes the history file and directory structure.
|
||||
* Creates the directory and file if they don't exist, and loads existing history.
|
||||
*/
|
||||
private void initializeHistoryFile() {
|
||||
public void initializeHistoryFile() {
|
||||
try {
|
||||
// Create directory if it doesn't exist
|
||||
Path dir = Paths.get(HISTORY_DIR);
|
||||
@@ -75,7 +75,7 @@ public class CalculatorHistory {
|
||||
/**
|
||||
* Loads history from the file into memory.
|
||||
*/
|
||||
private void loadHistory() {
|
||||
public void loadHistory() {
|
||||
try {
|
||||
if (Files.exists(historyFilePath)) {
|
||||
List<String> lines = Files.readAllLines(historyFilePath);
|
||||
@@ -134,5 +134,4 @@ public class CalculatorHistory {
|
||||
public String getHistoryFilePath() {
|
||||
return historyFilePath.toString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user