New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ELY-2379 Rename a local variable in FileAuditEndpoint class [local_variable_renamed] #2059
Closed
OluchukwuCatherineObi-Njoku
wants to merge
2
commits into
wildfly-security:2.x
from
OluchukwuCatherineObi-Njoku:2.x
Closed
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,22 +70,22 @@ 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); | ||
try { | ||
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @OluchukwuCatherineObi-Njoku This should not have been renamed, same goes for line 124 |
||
* | ||
* @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 | ||
*/ | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OluchukwuCatherineObi-Njoku Please rename to for example
isFileSet
orfileSet
to be more specific about what has been setThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello. I made the suggested updates. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Skyllarr