langtools/src/share/classes/com/sun/tools/javac/code/Lint.java
changeset 15385 ee1eebe7e210
parent 14801 d66cab4ef397
child 16301 b6fd735ea78e
equal deleted inserted replaced
15384:5a8d00abf076 15385:ee1eebe7e210
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    72     /**
    72     /**
    73      * Returns the result of combining the values in this object with
    73      * Returns the result of combining the values in this object with
    74      * the given annotations.
    74      * the given annotations.
    75      */
    75      */
    76     public Lint augment(Annotations annots) {
    76     public Lint augment(Annotations annots) {
    77         return augmentor.augment(this, annots.getAttributes());
    77         return augmentor.augment(this, annots.getDeclarationAttributes());
    78     }
    78     }
    79 
    79 
    80     /**
    80     /**
    81      * Returns the result of combining the values in this object with
    81      * Returns the result of combining the values in this object with
    82      * the given annotations and flags.
    82      * the given annotations and flags.
    83      */
    83      */
    84     public Lint augment(Annotations annots, long flags) {
    84     public Lint augment(Annotations annots, long flags) {
    85         Lint l = augmentor.augment(this, annots.getAttributes());
    85         Lint l = augmentor.augment(this, annots.getDeclarationAttributes());
    86         if ((flags & DEPRECATED) != 0) {
    86         if ((flags & DEPRECATED) != 0) {
    87             if (l == this)
    87             if (l == this)
    88                 l = new Lint(this);
    88                 l = new Lint(this);
    89             l.values.remove(LintCategory.DEPRECATION);
    89             l.values.remove(LintCategory.DEPRECATION);
    90             l.suppressedValues.add(LintCategory.DEPRECATION);
    90             l.suppressedValues.add(LintCategory.DEPRECATION);