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

Add Warnings to the JAX-WS and JAXB tools indicating they are deprecated

    Details

      Description

      It was suggested that we should add a simple warning message to the JAXWS and JAXB tools indicating that the tools have been deprecated and may be removed.

      The proposed change is:

      $ hg diff
      diff -r 3eae36c6baa5 src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/SchemaGenerator.java
      --- a/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/SchemaGenerator.java Tue Jan 23 12:23:55 2018 +0000
      +++ b/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/SchemaGenerator.java Wed Jan 24 12:29:34 2018 -0500
      @@ -64,6 +64,8 @@
            * Runs the schema generator.
            */
           public static void main(String[] args) throws Exception {
      + System.out.println("WARNING: schemagen has been deprecated and will be removed in a future release!");
      +
               System.exit(run(args));
           }
       
      diff -r 3eae36c6baa5 src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Driver.java
      --- a/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Driver.java Tue Jan 23 12:23:55 2018 +0000
      +++ b/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Driver.java Wed Jan 24 12:29:34 2018 -0500
      @@ -125,6 +125,8 @@
           }
       
           private static void _main( String[] args ) throws Exception {
      + System.out.println("WARNING: xjc has been deprecated and will be removed in a future release!");
      +
               try {
                   System.exit(run( args, System.out, System.out ));
               } catch (BadCommandLineException e) {
      diff -r 3eae36c6baa5 src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java
      --- a/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java Tue Jan 23 12:23:55 2018 +0000
      +++ b/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java Wed Jan 24 12:29:34 2018 -0500
      @@ -94,6 +94,7 @@
           }
       
           public boolean run(String[] args) {
      + System.out.println("WARNING: wsgen has been deprecated and will be removed in a future release!");
               final Listener listener = new Listener();
               for (String arg : args) {
                   if (arg.equals("-version")) {
      diff -r 3eae36c6baa5 src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java
      --- a/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java Tue Jan 23 12:23:55 2018 +0000
      +++ b/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java Wed Jan 24 12:29:34 2018 -0500
      @@ -170,6 +170,7 @@
       
           protected boolean run(String[] args, Listener listener,
                              Receiver receiver) {
      + System.out.println("WARNING: wsimport has been deprecated and will be removed in a future release!");
               for (String arg : args) {
                   if (arg.equals("-version")) {
                       listener.message(
      $

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lancea Lance Andersen
                Reporter:
                lancea Lance Andersen
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: