From 44ad37f5cbe72028e8a8a2061640cf6275b0a88f Mon Sep 17 00:00:00 2001 From: Elliot Hesp Date: Thu, 25 May 2017 10:44:51 +0100 Subject: [PATCH] [pref][android] Cleanup class methods --- .../invertase/firebase/perf/RNFirebasePerformance.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/android/src/main/java/io/invertase/firebase/perf/RNFirebasePerformance.java b/android/src/main/java/io/invertase/firebase/perf/RNFirebasePerformance.java index 62026975..81defc82 100644 --- a/android/src/main/java/io/invertase/firebase/perf/RNFirebasePerformance.java +++ b/android/src/main/java/io/invertase/firebase/perf/RNFirebasePerformance.java @@ -36,21 +36,18 @@ public class RNFirebasePerformance extends ReactContextBaseJavaModule { @ReactMethod public void start(String identifier) { - Trace trace = getOrCreateTrace(identifier); - trace.start(); + getOrCreateTrace(identifier).start(); } @ReactMethod public void stop(String identifier) { - Trace trace = getOrCreateTrace(identifier); - trace.stop(); + getOrCreateTrace(identifier).stop(); traces.remove(identifier); } @ReactMethod public void incrementCounter(String identifier, String event) { - Trace trace = getOrCreateTrace(identifier); - trace.incrementCounter(event); + getOrCreateTrace(identifier).incrementCounter(event); } private Trace getOrCreateTrace(String identifier) {