Derby
  1. Derby
  2. DERBY-4756

Silence deprecation warnings for JDBC 4 stubs

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.7.1.1
    • Component/s: Build tools
    • Labels:
      None

      Description

      Many warnings are printed when the java.sql.Date and java.sql.Time JDBC 4 stubs are compiled, because they override deprecated methods in java.util.Date. Example:

      [javac] /code/derby/trunk1/java/stubs/jdbc4/java/sql/Date.java:25: warning: [deprecation] getHours() in java.util.Date has been deprecated
      [javac] public int getHours()

      { return 0; }

      [javac] ^

      We should silence these warnings to make it easier to distinguish signal from noise.

      1. depr.diff
        2 kB
        Knut Anders Hatlen

        Activity

        Knut Anders Hatlen created issue -
        Hide
        Knut Anders Hatlen added a comment -

        The attached patch depr.diff adds a @Deprecated annotation to the methods that override the deprecated java.util.Date methods. This made the warnings for the JDBC 4 stubs go away.

        Show
        Knut Anders Hatlen added a comment - The attached patch depr.diff adds a @Deprecated annotation to the methods that override the deprecated java.util.Date methods. This made the warnings for the JDBC 4 stubs go away.
        Knut Anders Hatlen made changes -
        Field Original Value New Value
        Attachment depr.diff [ 12450415 ]
        Knut Anders Hatlen made changes -
        Issue & fix info [Patch Available]
        Hide
        Kristian Waagan added a comment -

        +1

        Show
        Kristian Waagan added a comment - +1
        Hide
        Knut Anders Hatlen added a comment -

        Committed revision 980460.

        Show
        Knut Anders Hatlen added a comment - Committed revision 980460.
        Knut Anders Hatlen made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Issue & fix info [Patch Available]
        Assignee Knut Anders Hatlen [ knutanders ]
        Fix Version/s 10.7.0.0 [ 12314971 ]
        Resolution Fixed [ 1 ]
        Rick Hillegas made changes -
        Fix Version/s 10.7.1.1 [ 12315564 ]
        Fix Version/s 10.7.1.0 [ 12314971 ]
        Gavin made changes -
        Workflow jira [ 12516519 ] Default workflow, editable Closed status [ 12800269 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        3d 20h 28m 1 Knut Anders Hatlen 29/Jul/10 15:57

          People

          • Assignee:
            Knut Anders Hatlen
            Reporter:
            Knut Anders Hatlen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development