Skip to content
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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -70,22 +70,22 @@ public class FileAuditEndpoint implements AuditEndpoint {
}

void setFile(final File file) throws IOException {
boolean ok = false;
boolean isSetUp = false;
Copy link
Contributor

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 or fileSet to be more specific about what has been set

Copy link
Contributor Author

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

Copy link
Contributor Author

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

@Skyllarr

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);
}
}
Expand All @@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The 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
*/
Expand All @@ -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
*/
Expand Down