illegal state exception when using interval 'year'
This commit is contained in:
@@ -56,6 +56,10 @@ public class StartOfInterval implements TemporalAdjuster {
|
|||||||
result = result.with(ChronoField.DAY_OF_MONTH, 1);
|
result = result.with(ChronoField.DAY_OF_MONTH, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case YEARS: {
|
||||||
|
result = result.with(ChronoField.MONTH_OF_YEAR, 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException("Unexpected value: " + unit);
|
throw new IllegalArgumentException("Unexpected value: " + unit);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user