langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java
changeset 41637 7b24b4c32ee6
parent 41031 9075bf88387b
child 42407 f3702cff2933
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Thu Oct 20 20:01:40 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Thu Oct 20 13:44:51 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -340,6 +340,13 @@
                     && toAnnotate.owner.kind != MTH
                     && types.isSameType(c.type, syms.deprecatedType)) {
                 toAnnotate.flags_field |= Flags.DEPRECATED;
+                Attribute fr = c.member(names.forRemoval);
+                if (fr instanceof Attribute.Constant) {
+                    Attribute.Constant v = (Attribute.Constant) fr;
+                    if (v.type == syms.booleanType && ((Integer) v.value) != 0) {
+                        toAnnotate.flags_field |= Flags.DEPRECATED_REMOVAL;
+                    }
+                }
             }
         }