Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8181943

Fix lint warnings in JAXP repo: dep-ann

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 10
    • xml
    • None
    • minimal
    • This change is merely adding annotation to previously deprecated classes using the @deprecated Javadoc tag.
    • Java API
    • SE

      Summary

      The @Deprecated annotation needs to be added to org/xml/sax/HandlerBase.java and org/xml/sax/helpers/AttributeListImpl.java

      Problem

      The following SAX classes were deprecated, but the @Deprecated annotation was not added:

      org/xml/sax/HandlerBase.java
      org/xml/sax/helpers/AttributeListImpl.java

      Solution

      Add the @Deprecated annotation to the classes.

      Specification

      --- a/src/java.xml/share/classes/org/xml/sax/HandlerBase.java
      +++ b/src/java.xml/share/classes/org/xml/sax/HandlerBase.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 2000, 2017, 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
      @@ -66,6 +66,7 @@
        * @deprecated This class works with the deprecated
        *             {@link org.xml.sax.DocumentHandler DocumentHandler}
        *             interface.  It has been replaced by the SAX2
        *             {@link org.xml.sax.helpers.DefaultHandler DefaultHandler}
        *             class.
        * @since 1.4, SAX 1.0
        * @author David Megginson
        * @see org.xml.sax.EntityResolver
        * @see org.xml.sax.DTDHandler
        * @see org.xml.sax.DocumentHandler
        * @see org.xml.sax.ErrorHandler
        */
      +@Deprecated(since="1.5")
       public class HandlerBase
           implements EntityResolver, DTDHandler, DocumentHandler, ErrorHandler
       {
      diff --git a/src/java.xml/share/classes/org/xml/sax/helpers/AttributeListImpl.java b/src/java.xml/share/classes/org/xml/sax/helpers/AttributeListImpl.java
      --- a/src/java.xml/share/classes/org/xml/sax/helpers/AttributeListImpl.java
      +++ b/src/java.xml/share/classes/org/xml/sax/helpers/AttributeListImpl.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 2000, 2017, 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
      @@ -87,6 +87,7 @@
        * @deprecated This class implements a deprecated interface,
        *             {@link org.xml.sax.AttributeList AttributeList};
        *             that interface has been replaced by
        *             {@link org.xml.sax.Attributes Attributes},
        *             which is implemented in the
        *             {@link org.xml.sax.helpers.AttributesImpl
        *            AttributesImpl} helper class.
        * @since 1.4, SAX 1.0
        * @author David Megginson
        * @see org.xml.sax.AttributeList
        * @see org.xml.sax.DocumentHandler#startElement
        */
      +@Deprecated(since="1.5")
       public class AttributeListImpl implements AttributeList
       {

            joehw Joe Wang
            joehw Joe Wang
            Lance Andersen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: