From 91a455ae90cc222c72bc42cb7645e5daddeb15c0 Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Sat, 25 Oct 2025 09:13:13 -0400 Subject: [PATCH] Fix spelling --- .../src/main/java/org/apache/log4j/helpers/FileWatchdog.java | 2 +- .../src/main/java/org/apache/log4j/helpers/PatternParser.java | 4 ++-- .../logging/log4j/core/util/datetime/FastDatePrinter.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/helpers/FileWatchdog.java b/log4j-1.2-api/src/main/java/org/apache/log4j/helpers/FileWatchdog.java index a43776bed76..ecf686faf4f 100644 --- a/log4j-1.2-api/src/main/java/org/apache/log4j/helpers/FileWatchdog.java +++ b/log4j-1.2-api/src/main/java/org/apache/log4j/helpers/FileWatchdog.java @@ -60,7 +60,7 @@ protected void checkAndConfigure() { try { fileExists = file.exists(); } catch (final SecurityException e) { - LogLog.warn("Was not allowed to read check file existance, file:[" + filename + "]."); + LogLog.warn("Was not allowed to read check file existence, file:[" + filename + "]."); interrupted = true; // there is no point in continuing return; } diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/helpers/PatternParser.java b/log4j-1.2-api/src/main/java/org/apache/log4j/helpers/PatternParser.java index 36c1c79dcbf..1af7fdbf22e 100644 --- a/log4j-1.2-api/src/main/java/org/apache/log4j/helpers/PatternParser.java +++ b/log4j-1.2-api/src/main/java/org/apache/log4j/helpers/PatternParser.java @@ -188,7 +188,7 @@ public PatternConverter parse() { formattingInfo.max = c - '0'; state = MAX_STATE; } else { - LogLog.error("Error occured in position " + i + ".\n Was expecting digit, instead got char \"" + LogLog.error("Error occurred in position " + i + ".\n Was expecting digit, instead got char \"" + c + "\"."); state = LITERAL_STATE; } @@ -397,7 +397,7 @@ public String convert(final LoggingEvent event) { try { converted = df.format(date); } catch (Exception ex) { - LogLog.error("Error occured while converting date.", ex); + LogLog.error("Error occurred while converting date.", ex); } return converted; } diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/datetime/FastDatePrinter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/datetime/FastDatePrinter.java index f4df3ebfa03..7e6f426f511 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/datetime/FastDatePrinter.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/datetime/FastDatePrinter.java @@ -451,7 +451,7 @@ public String format(final long millis) { /** * Creates a String representation of the given Calendar by applying the rules of this printer to it. - * @param c the Calender to apply the rules to. + * @param c the Calendar to apply the rules to. * @return a String representation of the given Calendar. */ private String applyRulesToString(final Calendar c) {