mirror of
https://github.com/google/nomulus
synced 2026-07-19 14:32:44 +00:00
Run automatic Java 8 conversion over codebase
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=171174380
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
package google.registry.model.ofy;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.FluentIterable;
|
||||
import com.googlecode.objectify.Key;
|
||||
import com.googlecode.objectify.Objectify;
|
||||
@@ -43,17 +42,20 @@ class TimestampInversionException extends RuntimeException {
|
||||
}
|
||||
|
||||
private TimestampInversionException(DateTime transactionTime, String problem) {
|
||||
super(Joiner.on('\n').join(
|
||||
String.format(
|
||||
"Timestamp inversion between transaction time (%s) and %s",
|
||||
transactionTime,
|
||||
problem),
|
||||
getFileAndLine(FluentIterable.from(new Exception().getStackTrace())
|
||||
.firstMatch(new Predicate<StackTraceElement>() {
|
||||
@Override
|
||||
public boolean apply(StackTraceElement element) {
|
||||
return !element.getClassName().startsWith(Objectify.class.getPackage().getName())
|
||||
&& !element.getClassName().startsWith(Ofy.class.getName());
|
||||
}}).get())));
|
||||
super(
|
||||
Joiner.on('\n')
|
||||
.join(
|
||||
String.format(
|
||||
"Timestamp inversion between transaction time (%s) and %s",
|
||||
transactionTime, problem),
|
||||
getFileAndLine(
|
||||
FluentIterable.from(new Exception().getStackTrace())
|
||||
.firstMatch(
|
||||
(StackTraceElement element) ->
|
||||
!element
|
||||
.getClassName()
|
||||
.startsWith(Objectify.class.getPackage().getName())
|
||||
&& !element.getClassName().startsWith(Ofy.class.getName()))
|
||||
.get())));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user