I am having the following piece of code
@UIUnitTimeout(8*60*1000) // works
@UIUnitTimeout(TimeUnit.MINUTES.toMillis(8)) // does not work
I know that according to the JLS only constant expressions are allowed as values to annotation attributes. But why? Why it isn't sufficient if the data types match? Is there anything that could possibly go wrong if the expressions were to be evaluated at runtime? Does every specification have a logical reasoning behind?