Class DateChecker

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

public final class DateChecker extends BugChecker implements BugChecker.MethodInvocationTreeMatcher, BugChecker.NewClassTreeMatcher
Warns against suspect looking calls to Date APIs. Notably, Date uses:
  • 1900-based years (negative values permitted)
  • 0-based months (with rollover and negative values permitted)
  • 1-based days (with rollover and negative values permitted)
  • 0-based hours (with rollover and negative values permitted)
  • 0-based minutes (with rollover and negative values permitted)
  • 0-based seconds (with rollover and negative values permitted)
Author:
kak@google.com (Kurt Alfred Kluever)
See Also: