Eclipse keeps giving me the error:
The value for annotation attribute Min.value must be a constant expression
But I am most definitely giving the annotation a constant.
private static final int MIN_YEAR = Calendar.getInstance().get(Calendar.YEAR) - 1;
@Min(MIN_YEAR)
If I change it to be
private static final int MIN_YEAR = 2013;
It's perfectly happy, but I shouldn't have to do that. Does anyone know why or how my MIN_YEAR constant isn't considered a constant if it's declared with an evaluated expression instead of a plain number?