-
1. Re: compiler warning on AnnotationLiteral subclass
gavin.king Jun 5, 2009 8:23 AM (in response to mikewse)@SuppressWarnings
-
2. Re: compiler warning on AnnotationLiteral subclass
mikewse Jun 5, 2009 8:50 PM (in response to mikewse)Right, yes. I did actually figure that one out myself. Though, having a class
implement
an annotation seems odd, so I can symphathize with the warning and was looking for a cleaner kind of change.Rephrasing my question: Do you believe this will be the final solution for this use-case, or are you still investigating alternatives?
And if this will be the final solution; have you somehow verified that this warning will not become an error in a future JDK?
-
3. Re: compiler warning on AnnotationLiteral subclass
gavin.king Jun 5, 2009 9:54 PM (in response to mikewse)
Do you believe this will be the final solution for this use-case, or are you still investigating alternatives?This is the only possible solution until the Java language adds support for instantiating annotations.
have you somehow verified that this warning will not become an error in a future JDK?Eh? This would be a non-backward compatible change to the language. There has only been one such non-backward compatible change since Java 1.2 (the assert keyword), and that was so amazingly unpopular that everyone at Sun has sworn it will never happen again.
-
4. Re: compiler warning on AnnotationLiteral subclass
mikewse Jun 6, 2009 1:52 PM (in response to mikewse)
Gavin King wrote on Jun 05, 2009 21:54:
This is the only possible solution until the Java language adds support for instantiating annotations.Ok, I meant that maybe you were investigating other ways of specifying annotations that would move the warning-inducing code inside WebBeans. But I see that it's probably hard.
There has only been one such non-backward compatible change since Java 1.2 (the assert keyword), and that was so amazingly unpopular that everyone at Sun has sworn it will never happen again.Right, good. I was thinking of that newer compilers may issue warnings in previously
clean
code (promoting clean to warning) and drawing conclusions about the possibility of warnings also being promoted to errors. Back in the C days a compiler upgrade could lead to just this ;-)