From 6057ee849bfbf37703d0bc37040c5b045fd1b27f Mon Sep 17 00:00:00 2001 From: OluchukwuCatherineObi-Njoku <105371136+OluchukwuCatherineObi-Njoku@users.noreply.github.com> Date: Thu, 26 Oct 2023 20:14:21 +0000 Subject: [PATCH 1/3] local_variable_renamed --- .../wildfly/security/audit/FileAuditEndpoint.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/audit/src/main/java/org/wildfly/security/audit/FileAuditEndpoint.java b/audit/src/main/java/org/wildfly/security/audit/FileAuditEndpoint.java index ea1605b22de..51ccf762718 100644 --- a/audit/src/main/java/org/wildfly/security/audit/FileAuditEndpoint.java +++ b/audit/src/main/java/org/wildfly/security/audit/FileAuditEndpoint.java @@ -70,7 +70,7 @@ public class FileAuditEndpoint implements AuditEndpoint { } void setFile(final File file) throws IOException { - boolean ok = false; + boolean isSetUp = false; final FileOutputStream fos = new FileOutputStream(file, true); try { final Writer writer = new OutputStreamWriter(new BufferedOutputStream(fos), this.charset); @@ -78,14 +78,14 @@ void setFile(final File file) throws IOException { this.fileDescriptor = fos.getFD(); this.writer = writer; this.file = file; - ok = true; + isSetUp = true; } finally { - if (! ok) { + if (! isSetUp) { safeClose(writer); } } } finally { - if (! ok) { + if (! isSetUp) { safeClose(fos); } } @@ -108,7 +108,7 @@ private void safeClose(Closeable c) { * This method can be overridden by subclasses to modify data written into file (to encrypt them for example), * or just for counting amount of written bytes for needs of log rotation and similar. * - * This method can be invoked only in synchronization block surrounding one log message processing. + * This method can be invisSetUped only in synchronization block surrounding one log message processing. * * @param toWrite the String to be written into the target local file */ @@ -121,7 +121,7 @@ void write(String toWrite) throws IOException { * This method is NO-OP by default. It is intended to be overridden by subclasses * which need to perform some operation before every writing into the target local file. * - * This method can be invoked only in synchronization block surrounding one log message processing. + * This method can be invisSetUped only in synchronization block surrounding one log message processing. * * @param instant time of the message acceptance */ From 2f74e5f3aedef099d5a097d29a62d6702108d470 Mon Sep 17 00:00:00 2001 From: OluchukwuCatherineObi-Njoku <105371136+OluchukwuCatherineObi-Njoku@users.noreply.github.com> Date: Tue, 31 Oct 2023 20:42:00 +0000 Subject: [PATCH 2/3] local variable renamed --- .../wildfly/security/audit/FileAuditEndpoint.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/audit/src/main/java/org/wildfly/security/audit/FileAuditEndpoint.java b/audit/src/main/java/org/wildfly/security/audit/FileAuditEndpoint.java index 51ccf762718..c3e2632a621 100644 --- a/audit/src/main/java/org/wildfly/security/audit/FileAuditEndpoint.java +++ b/audit/src/main/java/org/wildfly/security/audit/FileAuditEndpoint.java @@ -70,7 +70,7 @@ public class FileAuditEndpoint implements AuditEndpoint { } void setFile(final File file) throws IOException { - boolean isSetUp = false; + boolean isFileSet = false; final FileOutputStream fos = new FileOutputStream(file, true); try { final Writer writer = new OutputStreamWriter(new BufferedOutputStream(fos), this.charset); @@ -78,14 +78,14 @@ void setFile(final File file) throws IOException { this.fileDescriptor = fos.getFD(); this.writer = writer; this.file = file; - isSetUp = true; + isFileSet = true; } finally { - if (! isSetUp) { + if (! isFileSet) { safeClose(writer); } } } finally { - if (! isSetUp) { + if (! isFileSet) { safeClose(fos); } } @@ -108,7 +108,7 @@ private void safeClose(Closeable c) { * This method can be overridden by subclasses to modify data written into file (to encrypt them for example), * or just for counting amount of written bytes for needs of log rotation and similar. * - * This method can be invisSetUped only in synchronization block surrounding one log message processing. + * This method can be invoked only in synchronization block surrounding one log message processing. * * @param toWrite the String to be written into the target local file */ @@ -121,7 +121,7 @@ void write(String toWrite) throws IOException { * This method is NO-OP by default. It is intended to be overridden by subclasses * which need to perform some operation before every writing into the target local file. * - * This method can be invisSetUped only in synchronization block surrounding one log message processing. + * This method can be invisFileSeted only in synchronization block surrounding one log message processing. * * @param instant time of the message acceptance */ From 0f955d7eb6aba47a29d9fd0974e5fc43a51bcc13 Mon Sep 17 00:00:00 2001 From: Darran Lofthouse Date: Thu, 14 Mar 2024 17:26:50 +0000 Subject: [PATCH 3/3] [ELY-2379] Fix comment accidentally updated in prior change. --- .../main/java/org/wildfly/security/audit/FileAuditEndpoint.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audit/src/main/java/org/wildfly/security/audit/FileAuditEndpoint.java b/audit/src/main/java/org/wildfly/security/audit/FileAuditEndpoint.java index c3e2632a621..303c52f25ff 100644 --- a/audit/src/main/java/org/wildfly/security/audit/FileAuditEndpoint.java +++ b/audit/src/main/java/org/wildfly/security/audit/FileAuditEndpoint.java @@ -121,7 +121,7 @@ void write(String toWrite) throws IOException { * This method is NO-OP by default. It is intended to be overridden by subclasses * which need to perform some operation before every writing into the target local file. * - * This method can be invisFileSeted only in synchronization block surrounding one log message processing. + * This method can be invoked only in synchronization block surrounding one log message processing. * * @param instant time of the message acceptance */