JEP 277: Enhanced Deprecation
David M. Lloyd
david.lloyd at redhat.com
Thu Oct 29 11:43:25 UTC 2015
On 10/28/2015 03:24 PM, mark.reinhold at oracle.com wrote:
> New JEP Candidate: http://openjdk.java.net/jeps/277
A couple of comments.
Firstly, this seems highly JDK-centric and/or seems (in some respects)
to revolve around specific policies related to the JDK. Some of the
enum values in fact go so far as to reference JDK releases.
Secondly, the enums seem to range from categories of deprecation (i.e.
relating to the future of the class/member) to characterizations of the
behavior of the class/member in question.
It seems like this might be better accomplished with multiple
annotations, perhaps some being JDK-internal (e.g. CONDEMNED). If a
non-JDK-specific annotation for "condemnation" (man, that's a really
harsh term) is desired, it's probably best to put that information in
(ideally in a JSR-376 style version string) to the annotation e.g.
@ScheduledForRemovalIn("10").
I think "experimental" should be its own annotation. The reason is the
development lifecycle of a method, which might go experimential ->
(supported) -> deprecated -> (removed), optionally skipping any number
of steps along the way. While things might be both experimental and
deprecated, they have inherently different meanings.
I don't have any clear thoughts about DANGEROUS or UNIMPLEMENTED, except
that they just generally don't feel like a proper fit for some reason.
The fact that UNSPECIFIED is necessary is possibly a clue into this.
--
- DML
More information about the jdk9-dev
mailing list