Class FromTemporalAccessor

java.lang.Object
com.google.errorprone.bugpatterns.BugChecker
com.google.errorprone.bugpatterns.time.FromTemporalAccessor
All Implemented Interfaces:
BugChecker.MethodInvocationTreeMatcher, Suppressible, Serializable

public final class FromTemporalAccessor extends BugChecker implements BugChecker.MethodInvocationTreeMatcher
Bans calls to javaTimeType.from(temporalAmount) where the call is guaranteed to either:
  • throw a DateTimeException at runtime (e.g., LocalDate.from(month))
  • return the same parameter (e.g., Instant.from(instant))
Author:
kak@google.com (Kurt Alfred Kluever)
See Also: