|
66 | 66 | import org.checkerframework.checker.nullness.qual.Nullable; |
67 | 67 | import org.checkerframework.dataflow.qual.Pure; |
68 | 68 | import org.checkerframework.dataflow.qual.SideEffectFree; |
| 69 | +import org.checkerframework.framework.qual.AnnotatedFor; |
69 | 70 |
|
70 | 71 | import static java.time.temporal.ChronoField.HOUR_OF_DAY; |
71 | 72 | import static java.time.temporal.ChronoField.MICRO_OF_DAY; |
|
128 | 129 | * |
129 | 130 | * @since 1.8 |
130 | 131 | */ |
| 132 | +@AnnotatedFor({"nullness"}) |
131 | 133 | public final class LocalTime |
132 | 134 | implements Temporal, TemporalAdjuster, Comparable<LocalTime>, Serializable { |
133 | 135 |
|
@@ -542,7 +544,7 @@ private LocalTime(int hour, int minute, int second, int nanoOfSecond) { |
542 | 544 | * @return true if the field is supported on this time, false if not |
543 | 545 | */ |
544 | 546 | @Override |
545 | | - public boolean isSupported(TemporalField field) { |
| 547 | + public boolean isSupported(@Nullable TemporalField field) { |
546 | 548 | if (field instanceof ChronoField) { |
547 | 549 | return field.isTimeBased(); |
548 | 550 | } |
@@ -578,7 +580,7 @@ public boolean isSupported(TemporalField field) { |
578 | 580 | * @return true if the unit can be added/subtracted, false if not |
579 | 581 | */ |
580 | 582 | @Override // override for Javadoc |
581 | | - public boolean isSupported(TemporalUnit unit) { |
| 583 | + public boolean isSupported(@Nullable TemporalUnit unit) { |
582 | 584 | if (unit instanceof ChronoUnit) { |
583 | 585 | return unit.isTimeBased(); |
584 | 586 | } |
|
0 commit comments