Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Commit

Permalink
OCD: prefix static field with s
Browse files Browse the repository at this point in the history
Summary: `mWorker` should really be `sWorker`.

Reviewed By: BurntBrunch

Differential Revision: D16943500

fbshipit-source-id: 2132781a5a7c5f28018236767ac1553f6264ce19
  • Loading branch information
Ricardo Rey authored and facebook-github-bot committed Aug 21, 2019
1 parent 208cf19 commit 5fd7b07
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions java/main/com/facebook/profilo/logger/Logger.java
Expand Up @@ -39,7 +39,7 @@ public final class Logger {

private static volatile boolean sInitialized;

private static AtomicReference<LoggerWorkerThread> mWorker;
private static AtomicReference<LoggerWorkerThread> sWorker;
private static File sTraceDirectory;
private static String sFilePrefix;
private static NativeTraceWriterCallbacks sNativeTraceWriterCallbacks;
Expand All @@ -61,7 +61,7 @@ public static void initialize(
sLoggerCallbacks = loggerCallbacks;
sNativeTraceWriterCallbacks = nativeTraceWriterCallbacks;
sRingBufferSize = ringBufferSize;
mWorker = new AtomicReference<>(null);
sWorker = new AtomicReference<>(null);
}

public static void stopTraceWriter() {
Expand Down Expand Up @@ -172,7 +172,7 @@ private static native int loggerWriteAndWakeupTraceWriter(

@SuppressLint("BadMethodUse-java.lang.Thread.start")
private static void startWorkerThreadIfNecessary() {
if (mWorker.get() != null) {
if (sWorker.get() != null) {
// race conditions make it possible to try to start a second thread. ignore the call.
return;
}
Expand All @@ -188,7 +188,7 @@ private static void startWorkerThreadIfNecessary() {

LoggerWorkerThread thread = new LoggerWorkerThread(writer);

if (!mWorker.compareAndSet(null, thread)) {
if (!sWorker.compareAndSet(null, thread)) {
return;
}

Expand Down

0 comments on commit 5fd7b07

Please sign in to comment.