Replace FluentIterable with streams

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=180005797
This commit is contained in:
guyben 2017-12-23 07:08:35 -08:00 committed by Ben McIlwain
parent 552ab12314
commit 3f7cd00882
13 changed files with 121 additions and 104 deletions

View file

@ -14,7 +14,7 @@
package google.registry.util;
import com.google.common.collect.FluentIterable;
import java.util.Arrays;
import java.util.logging.Handler;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -44,8 +44,9 @@ public class FormattingLogger {
private void log(Level level, @Nullable Throwable cause, String msg) {
StackTraceElement callerFrame =
FluentIterable.from(new Exception().getStackTrace())
.firstMatch(frame -> !frame.getClassName().equals(FormattingLogger.class.getName()))
Arrays.stream(new Exception().getStackTrace())
.filter(frame -> !frame.getClassName().equals(FormattingLogger.class.getName()))
.findFirst()
.get();
if (cause == null) {
logger.logp(level, callerFrame.getClassName(), callerFrame.getMethodName(), msg);