8008274: javac should not reference/use sample code

Wed, 07 Aug 2013 11:04:07 +0100

author
vromero
date
Wed, 07 Aug 2013 11:04:07 +0100
changeset 1934
c7dcf899ffff
parent 1933
f3deeccbf4cf
child 1935
8c55df2442c1

8008274: javac should not reference/use sample code
Reviewed-by: jjg

src/share/classes/com/sun/tools/javac/Main.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/classes/com/sun/tools/javac/Main.java	Wed Aug 07 10:41:20 2013 +0100
     1.2 +++ b/src/share/classes/com/sun/tools/javac/Main.java	Wed Aug 07 11:04:07 2013 +0100
     1.3 @@ -26,8 +26,6 @@
     1.4  package com.sun.tools.javac;
     1.5  
     1.6  import java.io.PrintWriter;
     1.7 -import java.lang.reflect.*;
     1.8 -
     1.9  
    1.10  /**
    1.11   * The programmatic interface for the Java Programming Language
    1.12 @@ -44,23 +42,12 @@
    1.13  @jdk.Supported
    1.14  public class Main {
    1.15  
    1.16 -    /** Unsupported command line interface.
    1.17 -     * @param args   The command line parameters.
    1.18 +    /** Main entry point for the launcher.
    1.19 +     *  Note: This method calls System.exit.
    1.20 +     *  @param args command line arguments
    1.21       */
    1.22      public static void main(String[] args) throws Exception {
    1.23 -      if (args.length > 0 && args[0].equals("-Xjdb")) {
    1.24 -        String[] newargs = new String[args.length + 2];
    1.25 -        Class<?> c = Class.forName("com.sun.tools.example.debug.tty.TTY");
    1.26 -        Method method = c.getDeclaredMethod ("main", new Class<?>[] {args.getClass()});
    1.27 -        method.setAccessible(true);
    1.28 -        System.arraycopy(args, 1, newargs, 3, args.length - 1);
    1.29 -        newargs[0] = "-connect";
    1.30 -        newargs[1] = "com.sun.jdi.CommandLineLaunch:options=-esa -ea:com.sun.tools...";
    1.31 -        newargs[2] = "com.sun.tools.javac.Main";
    1.32 -        method.invoke(null, new Object[] { newargs });
    1.33 -      } else {
    1.34          System.exit(compile(args));
    1.35 -      }
    1.36      }
    1.37  
    1.38      /** Programmatic interface to the Java Programming Language

mercurial