Skip to content

Commit

Permalink
Bridge to back compatibility (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
schlosna authored Nov 6, 2017
1 parent 98f7b1b commit deb9280
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.Collections;
import java.util.List;
import java.util.function.LongPredicate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -162,7 +161,16 @@ public Builder<T, U> withPerformanceTraceLogging() {
LoggingInvocationEventHandler.LOG_DURATIONS_GREATER_THAN_1_MICROSECOND);
}

public Builder<T, U> withLogging(Logger logger, LoggingLevel loggingLevel, LongPredicate durationPredicate) {
/**
* Bridge for backward compatibility.
*/
public Builder<T, U> withLogging(Logger logger, LoggingLevel loggingLevel,
com.palantir.tritium.api.functions.LongPredicate durationPredicate) {
return withLogging(logger, loggingLevel, (java.util.function.LongPredicate) durationPredicate);
}

public Builder<T, U> withLogging(Logger logger, LoggingLevel loggingLevel,
java.util.function.LongPredicate durationPredicate) {
this.handlers.add(new LoggingInvocationEventHandler(logger, loggingLevel, durationPredicate));
return this;
}
Expand Down

0 comments on commit deb9280

Please sign in to comment.