mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Replace FluentIterable with streams
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=180005797
This commit is contained in:
parent
552ab12314
commit
3f7cd00882
13 changed files with 121 additions and 104 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue