-
Enhancement
-
Resolution: Won't Fix
-
P4
-
None
-
11
A DESCRIPTION OF THE REQUEST :
I am considering "static final" types that can be read from application configuration (file/DB ) as runtime constants. My application needs one such annotation attribute as per client requirements.
private static final int MY_CONST = Integer.parseInt(myConfig.getProperty("ClientDependantAttribute"));
@MyAnnotation(MyAttribute=MY_CONST) // <- Give error
public void foo(int bar)
JUSTIFICATION :
I want to use great java constructs like aspects and annotations, but because of this limitation it restricts such use.
Now I have to either add a duplicate perfectly reusable code in every method definitions or use a non-configurable value for annotation attribute.
I am sure many of other users will appreciate this enhancement.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
private static final int RETRY_CNT = Integer.parseInt(myConfig.getProperty("RetryCounts"));
@Retry(maxRetries=RETRY_CNT) // <- This should be acceptable
public void foo(int bar)
I am considering "static final" types that can be read from application configuration (file/DB ) as runtime constants. My application needs one such annotation attribute as per client requirements.
private static final int MY_CONST = Integer.parseInt(myConfig.getProperty("ClientDependantAttribute"));
@MyAnnotation(MyAttribute=MY_CONST) // <- Give error
public void foo(int bar)
JUSTIFICATION :
I want to use great java constructs like aspects and annotations, but because of this limitation it restricts such use.
Now I have to either add a duplicate perfectly reusable code in every method definitions or use a non-configurable value for annotation attribute.
I am sure many of other users will appreciate this enhancement.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
private static final int RETRY_CNT = Integer.parseInt(myConfig.getProperty("RetryCounts"));
@Retry(maxRetries=RETRY_CNT) // <- This should be acceptable
public void foo(int bar)