Merge
authortbell
Thu, 11 Jun 2009 21:35:12 -0700
changeset 2988 094272984b53
parent 2902 dbb955b1ee59 (current diff)
parent 2987 2e0ca9f4893d (diff)
child 2989 aca415f62ac6
child 3137 a8590199a00e
Merge
langtools/make/Makefile
langtools/make/build.xml
langtools/src/share/classes/sun/tools/javap/AttrData.java
langtools/src/share/classes/sun/tools/javap/CPX.java
langtools/src/share/classes/sun/tools/javap/CPX2.java
langtools/src/share/classes/sun/tools/javap/ClassData.java
langtools/src/share/classes/sun/tools/javap/Constants.java
langtools/src/share/classes/sun/tools/javap/FieldData.java
langtools/src/share/classes/sun/tools/javap/InnerClassData.java
langtools/src/share/classes/sun/tools/javap/JavapEnvironment.java
langtools/src/share/classes/sun/tools/javap/JavapPrinter.java
langtools/src/share/classes/sun/tools/javap/LineNumData.java
langtools/src/share/classes/sun/tools/javap/LocVarData.java
langtools/src/share/classes/sun/tools/javap/Main.java
langtools/src/share/classes/sun/tools/javap/MethodData.java
langtools/src/share/classes/sun/tools/javap/RuntimeConstants.java
langtools/src/share/classes/sun/tools/javap/StackMapData.java
langtools/src/share/classes/sun/tools/javap/StackMapTableData.java
langtools/src/share/classes/sun/tools/javap/Tables.java
langtools/src/share/classes/sun/tools/javap/TrapData.java
langtools/src/share/classes/sun/tools/javap/TypeSignature.java
langtools/test/tools/javac/code/ArrayClone.sh
langtools/test/tools/javap/ListTest.java
langtools/test/tools/javap/OptionTest.java
--- a/langtools/make/Makefile	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/make/Makefile	Thu Jun 11 21:35:12 2009 -0700
@@ -120,6 +120,14 @@
   endif
 endif 
 
+ifdef SOURCE_LANGUAGE_VERSION
+  ANT_OPTIONS += -Djavac.source=$(SOURCE_LANGUAGE_VERSION)
+else
+  ifdef JAVAC_SOURCE_ARG 
+    ANT_OPTIONS += -Djavac.source=$(JAVAC_SOURCE_ARG)
+  endif
+endif 
+
 ifdef ALT_BOOTDIR
   ANT_OPTIONS += -Dboot.java.home=$(ALT_BOOTDIR)
   ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR)
--- a/langtools/make/build.properties	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/make/build.properties	Thu Jun 11 21:35:12 2009 -0700
@@ -32,7 +32,8 @@
 # boot.java.home = /opt/jdk/1.5.0 
 boot.java = ${boot.java.home}/bin/java
 boot.javac = ${boot.java.home}/bin/javac
-boot.javac.target = 5
+boot.javac.source = 6
+boot.javac.target = 6
 
 # This is the JDK used to run the product version of the tools,
 # for example, for testing. If you're building a complete JDK, specify that.
@@ -59,7 +60,8 @@
 bootstrap.full.version = ${bootstrap.release}-${build.number}
 
 # options for the <javac> tasks used to compile the tools
-javac.target = 6
+javac.source = 5
+javac.target = 5
 javac.debug = true
 javac.debuglevel = source,lines
 javac.no.jdk.warnings = -XDignore.symbol.file=true
--- a/langtools/make/build.xml	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/make/build.xml	Thu Jun 11 21:35:12 2009 -0700
@@ -315,7 +315,7 @@
     <target name="build-javap" depends="build-javac">
         <build-tool name="javap"
                     includes="${javap.includes}"
-                    jarmainclass="sun.tools.javap.Main"
+                    jarmainclass="com.sun.tools.javap.Main"
                     jarclasspath="javac.jar"/>
     </target>
     
@@ -400,6 +400,7 @@
             <attribute name="java" default="java"/>
             <attribute name="javac.bootclasspath" default="-J-Xbootclasspath/p:${build.bootstrap.dir}/classes"/>
             <attribute name="javac.java.home" default="${boot.java.home}"/>
+            <attribute name="javac.source" default="${javac.source}"/>
             <attribute name="javac.target" default="${javac.target}"/>
             <attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/>
             <attribute name="jarclasspath" default=""/>
@@ -418,6 +419,7 @@
                     release="@{release}"
                     full.version="@{full.version}"
                     javac.bootclasspath="@{javac.bootclasspath}"
+                    javac.source="@{javac.source}"
                     javac.target="@{javac.target}"
                 />
                 <mkdir dir="@{bin.dir}"/>
@@ -442,6 +444,7 @@
             <attribute name="lib.dir" default="${dist.lib.dir}"/>
             <attribute name="javac.bootclasspath" default="-J-Xbootclasspath/p:${build.bootstrap.dir}/classes"/>
             <attribute name="javac.java.home" default="${boot.java.home}"/>
+            <attribute name="javac.source" default="${javac.source}"/>
             <attribute name="javac.target" default="${javac.target}"/>
             <attribute name="jarmainclass" default="com.sun.tools.@{name}.Main"/>
             <attribute name="jarclasspath" default=""/>
@@ -457,6 +460,7 @@
                     release="@{release}"
                     full.version="@{full.version}"
                     javac.bootclasspath="@{javac.bootclasspath}"
+                    javac.source="@{javac.source}"
                     javac.target="@{javac.target}"
                 />
                 <mkdir dir="@{lib.dir}"/>
@@ -481,6 +485,7 @@
             <attribute name="gensrc.dir" default="${build.gensrc.dir}"/>
             <attribute name="javac.bootclasspath" default="${build.bootstrap.dir}/classes"/>
             <attribute name="javac.java.home" default="${boot.java.home}"/>
+            <attribute name="javac.source" default="${javac.source}"/>
             <attribute name="javac.target" default="${javac.target}"/>
             <attribute name="release" default="${release}"/>
             <attribute name="full.version" default="${full.version}"/>
@@ -509,6 +514,7 @@
                        includes="@{includes}"
                        sourcepath=""
                        includeAntRuntime="no"
+                       source="@{javac.source}"
                        target="@{javac.target}">
                     <compilerarg value="-J-Xbootclasspath/p:@{javac.bootclasspath}"/>
                     <compilerarg line="${javac.version.opt}"/>
@@ -522,6 +528,7 @@
                        excludes="@{excludes}"
                        sourcepath=""
                        includeAntRuntime="no"
+                       source="@{javac.source}"
                        target="@{javac.target}"
                        debug="${javac.debug}" 
                        debuglevel="${javac.debuglevel}">
@@ -547,6 +554,7 @@
     <target name="-def-build-bootstrap-tool" depends="-check-boot.java.home,-def-build-tool">
         <presetdef name="build-bootstrap-tool">
             <build-tool
+                javac.source="${boot.javac.source}"
                 javac.target="${boot.javac.target}"
                 gensrc.dir="${build.bootstrap.dir}/gensrc"
                 classes.dir="${build.bootstrap.dir}/classes"
@@ -562,6 +570,7 @@
     <target name="-def-build-bootstrap-jar" depends="-def-build-jar">
         <presetdef name="build-bootstrap-jar">
             <build-jar
+                javac.source="${boot.javac.source}"
                 javac.target="${boot.javac.target}"
                 gensrc.dir="${build.bootstrap.dir}/gensrc"
                 classes.dir="${build.bootstrap.dir}/classes"
--- a/langtools/src/share/classes/com/sun/tools/apt/main/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/apt/main/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,6 @@
 package com.sun.tools.apt.main;
 
 import java.io.File;
-import java.io.FileOutputStream;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.PrintWriter;
@@ -37,14 +36,15 @@
 import java.util.Map;
 import java.util.HashMap;
 import java.util.Collections;
-import java.util.Collection;
 
 import java.net.URLClassLoader;
 import java.net.URL;
-import java.io.File;
 import java.net.MalformedURLException;
 
-import com.sun.tools.javac.file.Paths;
+import javax.tools.JavaFileManager;
+import javax.tools.StandardLocation;
+
+import com.sun.tools.javac.file.JavacFileManager;
 import com.sun.tools.javac.code.Source;
 import com.sun.tools.javac.code.Symbol;
 import com.sun.tools.javac.code.Type;
@@ -766,6 +766,7 @@
         providedFactory = factory;
 
         Context context = new Context();
+        JavacFileManager.preRegister(context);
         options = Options.instance(context);
         Bark bark;
 
@@ -862,14 +863,14 @@
             }
             origOptions = Collections.unmodifiableMap(origOptions);
 
+            JavacFileManager fm = (JavacFileManager) context.get(JavaFileManager.class);
             {
                 // Note: it might be necessary to check for an empty
                 // component ("") of the source path or class path
-                Paths paths = Paths.instance(context);
 
                 String sourceDest = options.get("-s");
-                if (paths.sourcePath() != null) {
-                    for(File f: paths.sourcePath())
+                if (fm.hasLocation(StandardLocation.SOURCE_PATH)) {
+                    for(File f: fm.getLocation(StandardLocation.SOURCE_PATH))
                         augmentedSourcePath += (f + File.pathSeparator);
                     augmentedSourcePath += (sourceDest == null)?".":sourceDest;
                 } else {
@@ -880,8 +881,8 @@
                 }
 
                 String classDest = options.get("-d");
-                if (paths.userClassPath() != null) {
-                    for(File f: paths.userClassPath())
+                if (fm.hasLocation(StandardLocation.CLASS_PATH)) {
+                    for(File f: fm.getLocation(StandardLocation.CLASS_PATH))
                         baseClassPath += (f + File.pathSeparator);
                     // put baseClassPath into map to handle any
                     // value needed for the classloader
@@ -908,9 +909,8 @@
              * uses.
              */
                 String aptclasspath = "";
-                Paths paths = Paths.instance(context);
                 String bcp = "";
-                Collection<File> bootclasspath = paths.bootClassPath();
+                Iterable<? extends File> bootclasspath = fm.getLocation(StandardLocation.PLATFORM_CLASS_PATH);
 
                 if (bootclasspath != null) {
                     for(File f: bootclasspath)
--- a/langtools/src/share/classes/com/sun/tools/classfile/ClassTranslator.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ClassTranslator.java	Thu Jun 11 21:35:12 2009 -0700
@@ -95,7 +95,7 @@
         if (cp2 == null) {
             ConstantPool.CPInfo[] pool2 = new ConstantPool.CPInfo[cp.size()];
             boolean eq = true;
-            for (int i = 0; i < cp.size(); i++) {
+            for (int i = 0; i < cp.size(); ) {
                 ConstantPool.CPInfo cpInfo;
                 try {
                     cpInfo = cp.get(i);
@@ -107,11 +107,7 @@
                 pool2[i] = cpInfo2;
                 if (cpInfo.getTag() != cpInfo2.getTag())
                     throw new IllegalStateException();
-                switch (cpInfo.getTag()) {
-                    case ConstantPool.CONSTANT_Double:
-                    case ConstantPool.CONSTANT_Long:
-                        i += 1;
-                }
+                i += cpInfo.size();
             }
 
             if (eq)
--- a/langtools/src/share/classes/com/sun/tools/classfile/ClassWriter.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ClassWriter.java	Thu Jun 11 21:35:12 2009 -0700
@@ -118,13 +118,8 @@
         ConstantPool pool = classFile.constant_pool;
         int size = pool.size();
         out.writeShort(size);
-        try {
-            for (int i = 1; i < size; ) {
-                i += constantPoolWriter.write(pool.get(i), out);
-            }
-        } catch (ConstantPoolException e) {
-            throw new Error(e); // ??
-        }
+        for (CPInfo cpInfo: pool.entries())
+            constantPoolWriter.write(cpInfo, out);
     }
 
     protected void writeFields() throws IOException {
--- a/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,6 +26,7 @@
 package com.sun.tools.classfile;
 
 import java.io.IOException;
+import java.util.Iterator;
 
 /**
  * See JVMS3, section 4.5.
@@ -223,6 +224,40 @@
         throw new EntryNotFound(value);
     }
 
+    public Iterable<CPInfo> entries() {
+        return new Iterable<CPInfo>() {
+            public Iterator<CPInfo> iterator() {
+                return new Iterator<CPInfo>() {
+
+                    public boolean hasNext() {
+                        return next < pool.length;
+                    }
+
+                    public CPInfo next() {
+                        current = pool[next];
+                        switch (current.getTag()) {
+                            case CONSTANT_Double:
+                            case CONSTANT_Long:
+                                next += 2;
+                                break;
+                            default:
+                                next += 1;
+                        }
+                        return current;
+                    }
+
+                    public void remove() {
+                        throw new UnsupportedOperationException();
+                    }
+
+                    private CPInfo current;
+                    private int next = 1;
+
+                };
+            }
+        };
+    }
+
     private CPInfo[] pool;
 
     public interface Visitor<R,P> {
@@ -250,6 +285,12 @@
 
         public abstract int getTag();
 
+        /** The number of slots in the constant pool used by this entry.
+         * 2 for CONSTANT_Double and CONSTANT_Long; 1 for everything else. */
+        public int size() {
+            return 1;
+        }
+
         public abstract <R,D> R accept(Visitor<R,D> visitor, D data);
 
         protected final ConstantPool cp;
@@ -310,6 +351,20 @@
             return cp.getUTF8Value(name_index);
         }
 
+        public String getBaseName() throws ConstantPoolException {
+            String name = getName();
+            int index = name.indexOf("[L") + 1;
+            return name.substring(index);
+        }
+
+        public int getDimensionCount() throws ConstantPoolException {
+            String name = getName();
+            int count = 0;
+            while (name.charAt(count) == '[')
+                count++;
+            return count;
+        }
+
         @Override
         public String toString() {
             return "CONSTANT_Class_info[name_index: " + name_index + "]";
@@ -336,6 +391,11 @@
         }
 
         @Override
+        public int size() {
+            return 2;
+        }
+
+        @Override
         public String toString() {
             return "CONSTANT_Double_info[value: " + value + "]";
         }
@@ -449,6 +509,11 @@
         }
 
         @Override
+        public int size() {
+            return 2;
+        }
+
+        @Override
         public String toString() {
             return "CONSTANT_Long_info[value: " + value + "]";
         }
--- a/langtools/src/share/classes/com/sun/tools/classfile/StackMapTable_attribute.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/classfile/StackMapTable_attribute.java	Thu Jun 11 21:35:12 2009 -0700
@@ -107,6 +107,8 @@
             return 1;
         }
 
+        public abstract int getOffsetDelta();
+
         public abstract <R,D> R accept(Visitor<R,D> visitor, D data);
 
         public final int frame_type;
@@ -130,6 +132,10 @@
         public <R, D> R accept(Visitor<R, D> visitor, D data) {
             return visitor.visit_same_frame(this, data);
         }
+
+        public int getOffsetDelta() {
+            return frame_type;
+        }
     }
 
     public static class same_locals_1_stack_item_frame extends stack_map_frame {
@@ -149,6 +155,10 @@
             return visitor.visit_same_locals_1_stack_item_frame(this, data);
         }
 
+        public int getOffsetDelta() {
+            return frame_type - 64;
+        }
+
         public final verification_type_info[] stack;
     }
 
@@ -170,6 +180,10 @@
             return visitor.visit_same_locals_1_stack_item_frame_extended(this, data);
         }
 
+        public int getOffsetDelta() {
+            return offset_delta;
+        }
+
         public final int offset_delta;
         public final verification_type_info[] stack;
     }
@@ -189,6 +203,10 @@
             return visitor.visit_chop_frame(this, data);
         }
 
+        public int getOffsetDelta() {
+            return offset_delta;
+        }
+
         public final int offset_delta;
     }
 
@@ -207,6 +225,10 @@
             return visitor.visit_same_frame_extended(this, data);
         }
 
+        public int getOffsetDelta() {
+            return offset_delta;
+        }
+
         public final int offset_delta;
     }
 
@@ -232,6 +254,10 @@
             return visitor.visit_append_frame(this, data);
         }
 
+        public int getOffsetDelta() {
+            return offset_delta;
+        }
+
         public final int offset_delta;
         public final verification_type_info[] locals;
     }
@@ -266,6 +292,10 @@
             return visitor.visit_full_frame(this, data);
         }
 
+        public int getOffsetDelta() {
+            return offset_delta;
+        }
+
         public final int offset_delta;
         public final int number_of_locals;
         public final verification_type_info[] locals;
@@ -308,7 +338,7 @@
             }
         }
 
-        verification_type_info(int tag) {
+        protected verification_type_info(int tag) {
             this.tag = tag;
         }
 
--- a/langtools/src/share/classes/com/sun/tools/classfile/Type.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Type.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,10 @@
 
 package com.sun.tools.classfile;
 
+import java.util.Arrays;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 /*
  *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
@@ -33,8 +36,9 @@
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
-public class Type {
+public abstract class Type {
     protected Type() { }
+    public abstract <R,D> R accept(Visitor<R,D> visitor, D data);
 
     protected static void append(StringBuilder sb, String prefix, List<? extends Type> types, String suffix) {
         sb.append(prefix);
@@ -52,11 +56,33 @@
             append(sb, prefix, types, suffix);
     }
 
+    public interface Visitor<R,P> {
+        R visitSimpleType(SimpleType type, P p);
+        R visitArrayType(ArrayType type, P p);
+        R visitMethodType(MethodType type, P p);
+        R visitClassSigType(ClassSigType type, P p);
+        R visitClassType(ClassType type, P p);
+        R visitInnerClassType(InnerClassType type, P p);
+        R visitTypeArgType(TypeArgType type, P p);
+        R visitWildcardType(WildcardType type, P p);
+    }
+
     public static class SimpleType extends Type {
         public SimpleType(String name) {
             this.name = name;
         }
 
+        public <R, D> R accept(Visitor<R, D> visitor, D data) {
+            return visitor.visitSimpleType(this, data);
+        }
+
+        public boolean isPrimitiveType() {
+            return primitiveTypes.contains(name);
+        }
+        // where
+        private static final Set<String> primitiveTypes = new HashSet<String>(Arrays.asList(
+            "boolean", "byte", "char", "double", "float", "int", "long", "short", "void"));
+
         @Override
         public String toString() {
             return name;
@@ -70,6 +96,10 @@
             this.elemType = elemType;
         }
 
+        public <R, D> R accept(Visitor<R, D> visitor, D data) {
+            return visitor.visitArrayType(this, data);
+        }
+
         @Override
         public String toString() {
             return elemType + "[]";
@@ -93,6 +123,10 @@
             this.throwsTypes = throwsTypes;
         }
 
+        public <R, D> R accept(Visitor<R, D> visitor, D data) {
+            return visitor.visitMethodType(this, data);
+        }
+
         @Override
         public String toString() {
             StringBuilder sb = new StringBuilder();
@@ -116,6 +150,10 @@
             this.superinterfaceTypes = superinterfaceTypes;
         }
 
+        public <R, D> R accept(Visitor<R, D> visitor, D data) {
+            return visitor.visitClassSigType(this, data);
+        }
+
         @Override
         public String toString() {
             StringBuilder sb = new StringBuilder();
@@ -139,6 +177,10 @@
             this.typeArgs = typeArgs;
         }
 
+        public <R, D> R accept(Visitor<R, D> visitor, D data) {
+            return visitor.visitClassType(this, data);
+        }
+
         @Override
         public String toString() {
             StringBuilder sb = new StringBuilder();
@@ -158,6 +200,10 @@
             this.innerType = innerType;
         }
 
+        public <R, D> R accept(Visitor<R, D> visitor, D data) {
+            return visitor.visitInnerClassType(this, data);
+        }
+
         @Override
         public String toString() {
             return outerType + "." + innerType;
@@ -174,6 +220,10 @@
             this.interfaceBounds = interfaceBounds;
         }
 
+        public <R, D> R accept(Visitor<R, D> visitor, D data) {
+            return visitor.visitTypeArgType(this, data);
+        }
+
         @Override
         public String toString() {
             StringBuilder sb = new StringBuilder();
@@ -209,6 +259,10 @@
             this.boundType = boundType;
         }
 
+        public <R, D> R accept(Visitor<R, D> visitor, D data) {
+            return visitor.visitWildcardType(this, data);
+        }
+
         @Override
         public String toString() {
             if (kind == null)
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java	Thu Jun 11 21:35:12 2009 -0700
@@ -43,6 +43,9 @@
  */
 public abstract class Printer implements Type.Visitor<String, Locale>, Symbol.Visitor<String, Locale> {
 
+    List<Type> seenCaptured = List.nil();
+    static final int PRIME = 997;  // largest prime less than 1000
+
     /**
      * This method should be overriden in order to provide proper i18n support.
      *
@@ -54,7 +57,18 @@
     protected abstract String localize(Locale locale, String key, Object... args);
 
     /**
-     * Create a printer with default i18n support provided my Messages.
+     * Maps a captured type into an unique identifier.
+     *
+     * @param t the captured type for which an id is to be retrieved
+     * @param locale locale settings
+     * @return unique id representing this captured type
+     */
+    protected abstract String capturedVarId(CapturedType t, Locale locale);
+
+    /**
+     * Create a printer with default i18n support provided by Messages. By default,
+     * captured types ids are generated using hashcode.
+     *
      * @param messages Messages class to be used for i18n
      * @return printer visitor instance
      */
@@ -63,6 +77,11 @@
             @Override
             protected String localize(Locale locale, String key, Object... args) {
                 return messages.getLocalizedString(locale, key, args);
+            }
+
+            @Override
+            protected String capturedVarId(CapturedType t, Locale locale) {
+                return (t.hashCode() & 0xFFFFFFFFL) % PRIME + "";
         }};
     }
 
@@ -120,9 +139,20 @@
 
     @Override
     public String visitCapturedType(CapturedType t, Locale locale) {
-        return localize(locale, "compiler.misc.type.captureof",
-            (t.hashCode() & 0xFFFFFFFFL) % Type.CapturedType.PRIME,
-            visit(t.wildcard, locale));
+        if (seenCaptured.contains(t))
+            return localize(locale, "compiler.misc.type.captureof.1",
+                capturedVarId(t, locale));
+        else {
+            try {
+                seenCaptured = seenCaptured.prepend(t);
+                return localize(locale, "compiler.misc.type.captureof",
+                    capturedVarId(t, locale),
+                    visit(t.wildcard, locale));
+            }
+            finally {
+                seenCaptured = seenCaptured.tail;
+            }
+        }
     }
 
     @Override
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Source.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Source.java	Thu Jun 11 21:35:12 2009 -0700
@@ -95,7 +95,7 @@
         this.name = name;
     }
 
-    public static final Source DEFAULT = JDK1_5;
+    public static final Source DEFAULT = JDK1_7;
 
     public static Source lookup(String name) {
         return tab.get(name);
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Type.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Type.java	Thu Jun 11 21:35:12 2009 -0700
@@ -1008,11 +1008,10 @@
         @Override
         public String toString() {
             return "capture#"
-                + (hashCode() & 0xFFFFFFFFL) % PRIME
+                + (hashCode() & 0xFFFFFFFFL) % Printer.PRIME
                 + " of "
                 + wildcard;
         }
-        static final int PRIME = 997;  // largest prime less than 1000
     }
 
     public static abstract class DelegatedType extends Type {
--- a/langtools/src/share/classes/com/sun/tools/javac/file/Paths.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/Paths.java	Thu Jun 11 21:35:12 2009 -0700
@@ -66,7 +66,7 @@
      *  @param context the context
      *  @return the Paths instance for this context
      */
-    public static Paths instance(Context context) {
+    static Paths instance(Context context) {
         Paths instance = context.get(pathsKey);
         if (instance == null)
             instance = new Paths(context);
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Target.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Target.java	Thu Jun 11 21:35:12 2009 -0700
@@ -108,7 +108,7 @@
         this.minorVersion = minorVersion;
     }
 
-    public static final Target DEFAULT = JDK1_6;
+    public static final Target DEFAULT = JDK1_7;
 
     public static Target lookup(String name) {
         return tab.get(name);
--- a/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Thu Jun 11 21:35:12 2009 -0700
@@ -391,6 +391,8 @@
             (options.get("shouldStopPolicy") != null)
             ? CompileState.valueOf(options.get("shouldStopPolicy"))
             : null;
+        if (options.get("oldDiags") == null)
+            log.setDiagnosticFormatter(RichDiagnosticFormatter.instance(context));
     }
 
     /* Switches:
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Thu Jun 11 21:35:12 2009 -0700
@@ -55,7 +55,6 @@
 import com.sun.tools.javac.api.JavacTaskImpl;
 import com.sun.tools.javac.code.*;
 import com.sun.tools.javac.code.Symbol.*;
-import com.sun.tools.javac.file.Paths;
 import com.sun.tools.javac.file.JavacFileManager;
 import com.sun.tools.javac.jvm.*;
 import com.sun.tools.javac.main.JavaCompiler;
@@ -180,7 +179,6 @@
     }
 
     private void initProcessorIterator(Context context, Iterable<? extends Processor> processors) {
-        Paths paths = Paths.instance(context);
         Log   log   = Log.instance(context);
         Iterator<? extends Processor> processorIterator;
 
--- a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Thu Jun 11 21:35:12 2009 -0700
@@ -1165,3 +1165,64 @@
 compiler.err.enums.not.supported.in.source=\
     enums are not supported in -source {0}\n\
 (use -source 5 or higher to enable enums)
+
+########################################
+# Diagnostics for where clause implementation
+# used by the RichDiagnosticFormatter.
+########################################
+
+compiler.misc.type.null=\
+    <null>
+
+# X#n (where n is an int id) is disambiguated tvar name
+compiler.misc.type.var=\
+    {0}#{1}
+
+# CAP#n (where n is an int id) is an abbreviation for 'captured type'
+compiler.misc.captured.type=\
+    CAP#{0}
+
+# <INT#n> (where n is an int id) is an abbreviation for 'intersection type'
+compiler.misc.intersection.type=\
+    INT#{0}
+
+# where clause for captured type: contains upper ('extends {1}') and lower
+# ('super {2}') bound along with the wildcard that generated this captured type ({3})
+compiler.misc.where.captured=\
+    {0} extends {1} super: {2} from capture of {3}
+
+# compact where clause for captured type: contains upper ('extends {1}') along
+# with the wildcard that generated this captured type ({3})
+compiler.misc.where.captured.1=\
+    {0} extends {1} from capture of {3}
+
+# where clause for type variable: contains upper bound(s) ('extends {1}') along with
+# the kindname ({2}) and location ({3}) in which the typevar has been declared
+compiler.misc.where.typevar=\
+    {0} extends {1} declared in {2} {3}
+
+# compact where clause for type variable: contains the kindname ({2}) and location ({3})
+# in which the typevar has been declared
+compiler.misc.where.typevar.1=\
+    {0} declared in {2} {3}
+
+# where clause for type variable: contains all the upper bound(s) ('extends {1}')
+# of this intersection type
+compiler.misc.where.intersection=\
+    {0} extends {1}
+
+### Where clause headers ###
+compiler.misc.where.description.captured=\
+    where {0} is a fresh type-variable:
+compiler.misc.where.description.typevar=\
+    where {0} is a type-variable:
+compiler.misc.where.description.intersection=\
+    where {0} is an intersection type:
+compiler.misc.where.description.captured.1=\
+    where {0} are fresh type-variables:
+compiler.misc.where.description.typevar.1=\
+    where {0} are type-variables:
+compiler.misc.where.description.intersection.1=\
+    where {0} are intersection types:
+
+
--- a/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java	Thu Jun 11 21:35:12 2009 -0700
@@ -77,9 +77,11 @@
     protected int depth = 0;
 
     /**
-     * Printer instance to be used for formatting types/symbol
+     * All captured types that have been encountered during diagnostic formatting.
+     * This info is used by the FormatterPrinter in order to print friendly unique
+     * ids for captured types
      */
-    protected Printer printer;
+    private List<Type> allCaptured = List.nil();
 
     /**
      * Initialize an AbstractDiagnosticFormatter by setting its JavacMessages object.
@@ -88,7 +90,6 @@
     protected AbstractDiagnosticFormatter(JavacMessages messages, SimpleConfiguration config) {
         this.messages = messages;
         this.config = config;
-        this.printer = new FormatterPrinter();
     }
 
     public String formatKind(JCDiagnostic d, Locale l) {
@@ -104,7 +105,7 @@
 
     @Override
     public String format(JCDiagnostic d, Locale locale) {
-        printer = new FormatterPrinter();
+        allCaptured = List.nil();
         return formatDiagnostic(d, locale);
     }
 
@@ -171,6 +172,9 @@
             return formatIterable(d, (Iterable<?>)arg, l);
         }
         else if (arg instanceof Type) {
+            if (!allCaptured.contains(arg)) {
+                allCaptured = allCaptured.append((Type)arg);
+            }
             return printer.visit((Type)arg, l);
         }
         else if (arg instanceof Symbol) {
@@ -291,6 +295,10 @@
                 d.getIntPosition() != Position.NOPOS;
     }
 
+    public boolean isRaw() {
+        return false;
+    }
+
     /**
      * Creates a string with a given amount of empty spaces. Useful for
      * indenting the text of a diagnostic message.
@@ -355,26 +363,26 @@
             String showSource = null;
             if ((showSource = options.get("showSource")) != null) {
                 if (showSource.equals("true"))
-                    visibleParts.add(DiagnosticPart.SOURCE);
+                    setVisiblePart(DiagnosticPart.SOURCE, true);
                 else if (showSource.equals("false"))
-                    visibleParts.remove(DiagnosticPart.SOURCE);
+                    setVisiblePart(DiagnosticPart.SOURCE, false);
             }
             String diagOpts = options.get("diags");
             if (diagOpts != null) {//override -XDshowSource
                 Collection<String> args = Arrays.asList(diagOpts.split(","));
                 if (args.contains("short")) {
-                    visibleParts.remove(DiagnosticPart.DETAILS);
-                    visibleParts.remove(DiagnosticPart.SUBDIAGNOSTICS);
+                    setVisiblePart(DiagnosticPart.DETAILS, false);
+                    setVisiblePart(DiagnosticPart.SUBDIAGNOSTICS, false);
                 }
                 if (args.contains("source"))
-                    visibleParts.add(DiagnosticPart.SOURCE);
+                    setVisiblePart(DiagnosticPart.SOURCE, true);
                 if (args.contains("-source"))
-                    visibleParts.remove(DiagnosticPart.SOURCE);
+                    setVisiblePart(DiagnosticPart.SOURCE, false);
             }
             String multiPolicy = null;
             if ((multiPolicy = options.get("multilinePolicy")) != null) {
                 if (multiPolicy.equals("disabled"))
-                    visibleParts.remove(DiagnosticPart.SUBDIAGNOSTICS);
+                    setVisiblePart(DiagnosticPart.SUBDIAGNOSTICS, false);
                 else if (multiPolicy.startsWith("limit:")) {
                     String limitString = multiPolicy.substring("limit:".length());
                     String[] limits = limitString.split(":");
@@ -421,6 +429,13 @@
             visibleParts = EnumSet.copyOf(diagParts);
         }
 
+        public void setVisiblePart(DiagnosticPart diagParts, boolean enabled) {
+            if (enabled)
+                visibleParts.add(diagParts);
+            else
+                visibleParts.remove(diagParts);
+        }
+
         /**
          * Shows a '^' sign under the source line displayed by the formatter
          * (if applicable).
@@ -441,6 +456,14 @@
         }
     }
 
+    public Printer getPrinter() {
+        return printer;
+    }
+
+    public void setPrinter(Printer printer) {
+        this.printer = printer;
+    }
+
     /**
      * An enhanced printer for formatting types/symbols used by
      * AbstractDiagnosticFormatter. Provides alternate numbering of captured
@@ -450,33 +473,14 @@
      * type referred by a given captured type C contains C itself) which might
      * lead to infinite loops.
      */
-    protected class FormatterPrinter extends Printer {
-
-        List<Type> allCaptured = List.nil();
-        List<Type> seenCaptured = List.nil();
-
+    protected Printer printer = new Printer() {
         @Override
         protected String localize(Locale locale, String key, Object... args) {
             return AbstractDiagnosticFormatter.this.localize(locale, key, args);
         }
-
         @Override
-        public String visitCapturedType(CapturedType t, Locale locale) {
-            if (seenCaptured.contains(t))
-                return localize(locale, "compiler.misc.type.captureof.1",
-                    allCaptured.indexOf(t) + 1);
-            else {
-                try {
-                    seenCaptured = seenCaptured.prepend(t);
-                    allCaptured = allCaptured.append(t);
-                    return localize(locale, "compiler.misc.type.captureof",
-                        allCaptured.indexOf(t) + 1,
-                        visit(t.wildcard, locale));
-                }
-                finally {
-                    seenCaptured = seenCaptured.tail;
-                }
-            }
+        protected String capturedVarId(CapturedType t, Locale locale) {
+            return "" + (allCaptured.indexOf(t) + 1);
         }
-    }
+    };
 }
--- a/langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java	Thu Jun 11 21:35:12 2009 -0700
@@ -209,6 +209,7 @@
 
     @Override
     public BasicConfiguration getConfiguration() {
+        //the following cast is always safe - see init
         return (BasicConfiguration)super.getConfiguration();
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/ForwardingDiagnosticFormatter.java	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,132 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package com.sun.tools.javac.util;
+
+import java.util.Set;
+import java.util.Locale;
+import javax.tools.Diagnostic;
+
+import com.sun.tools.javac.api.DiagnosticFormatter;
+import com.sun.tools.javac.api.DiagnosticFormatter.Configuration;
+import com.sun.tools.javac.api.DiagnosticFormatter.Configuration.DiagnosticPart;
+import com.sun.tools.javac.api.DiagnosticFormatter.Configuration.MultilineLimit;
+import com.sun.tools.javac.api.DiagnosticFormatter.PositionKind;
+
+/**
+ * A delegated diagnostic formatter delegates all formatting
+ * actions to an underlying formatter (aka the delegated formatter).
+ */
+public class ForwardingDiagnosticFormatter<D extends Diagnostic<?>, F extends DiagnosticFormatter<D>>
+        implements DiagnosticFormatter<D> {
+
+    /**
+     * The delegated formatter
+     */
+    protected F formatter;
+
+    /*
+     * configuration object used by this formatter
+     */
+    protected ForwardingConfiguration configuration;
+
+    public ForwardingDiagnosticFormatter(F formatter) {
+        this.formatter = formatter;
+        this.configuration = new ForwardingConfiguration(formatter.getConfiguration());
+    }
+
+    /**
+     * Returns the underlying delegated formatter
+     * @return delegate formatter
+     */
+    public F getDelegatedFormatter() {
+        return formatter;
+    }
+
+    public Configuration getConfiguration() {
+        return configuration;
+    }
+
+    public boolean displaySource(D diag) {
+        return formatter.displaySource(diag);
+    }
+
+    public String format(D diag, Locale l) {
+        return formatter.format(diag, l);
+    }
+
+    public String formatKind(D diag, Locale l) {
+        return formatter.formatKind(diag, l);
+    }
+
+    public String formatMessage(D diag, Locale l) {
+        return formatter.formatMessage(diag, l);
+    }
+
+    public String formatPosition(D diag, PositionKind pk, Locale l) {
+        return formatter.formatPosition(diag, pk, l);
+    }
+
+    public String formatSource(D diag, boolean fullname, Locale l) {
+        return formatter.formatSource(diag, fullname, l);
+    }
+
+    /**
+     * A delegated formatter configuration delegates all configurations settings
+     * to an underlying configuration object (aka the delegated configuration).
+     */
+    public static class ForwardingConfiguration implements DiagnosticFormatter.Configuration {
+
+        /** The configurationr object to which the forwarding configuration delegates some settings */
+        protected Configuration configuration;
+
+        public ForwardingConfiguration(Configuration configuration) {
+            this.configuration = configuration;
+        }
+
+        /**
+         * Returns the underlying delegated configuration.
+         * @return delegated configuration
+         */
+        public Configuration getDelegatedConfiguration() {
+            return configuration;
+        }
+
+        public int getMultilineLimit(MultilineLimit limit) {
+            return configuration.getMultilineLimit(limit);
+        }
+
+        public Set<DiagnosticPart> getVisible() {
+            return configuration.getVisible();
+        }
+
+        public void setMultilineLimit(MultilineLimit limit, int value) {
+            configuration.setMultilineLimit(limit, value);
+        }
+
+        public void setVisible(Set<DiagnosticPart> diagParts) {
+            configuration.setVisible(diagParts);
+        }
+    }
+}
--- a/langtools/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java	Thu Jun 11 21:35:12 2009 -0700
@@ -124,4 +124,9 @@
         }
         return buf.toString();
     }
+
+    @Override
+    public boolean isRaw() {
+        return true;
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,648 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package com.sun.tools.javac.util;
+
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Locale;
+import java.util.Map;
+
+import com.sun.tools.javac.code.Kinds;
+import com.sun.tools.javac.code.Printer;
+import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.code.Symbol.*;
+import com.sun.tools.javac.code.Symtab;
+import com.sun.tools.javac.code.Type;
+import com.sun.tools.javac.code.Type.*;
+import com.sun.tools.javac.code.Types;
+
+import static com.sun.tools.javac.code.TypeTags.*;
+import static com.sun.tools.javac.code.Flags.*;
+import static com.sun.tools.javac.util.LayoutCharacters.*;
+import static com.sun.tools.javac.util.RichDiagnosticFormatter.RichConfiguration.*;
+
+/**
+ * A rich diagnostic formatter is a formatter that provides better integration
+ * with javac's type system. A diagostic is first preprocessed in order to keep
+ * track of each types/symbols in it; after these informations are collected,
+ * the diagnostic is rendered using a standard formatter, whose type/symbol printer
+ * has been replaced by a more refined version provided by this rich formatter.
+ * The rich formatter currently enables three different features: (i) simple class
+ * names - that is class names are displayed used a non qualified name (thus
+ * omitting package info) whenever possible - (ii) where clause list - a list of
+ * additional subdiagnostics that provide specific info about type-variables,
+ * captured types, intersection types that occur in the diagnostic that is to be
+ * formatted and (iii) type-variable disambiguation - when the diagnostic refers
+ * to two different type-variables with the same name, their representation is
+ * disambiguated by appending an index to the type variable name.
+ */
+public class RichDiagnosticFormatter extends
+        ForwardingDiagnosticFormatter<JCDiagnostic, AbstractDiagnosticFormatter> {
+
+    final Symtab syms;
+    final Types types;
+    final JCDiagnostic.Factory diags;
+    final JavacMessages messages;
+
+    /* name simplifier used by this formatter */
+    ClassNameSimplifier nameSimplifier;
+
+    /* map for keeping track of a where clause associated to a given type */
+    Map<WhereClauseKind, Map<Type, JCDiagnostic>> whereClauses;
+
+    /** Get the DiagnosticFormatter instance for this context. */
+    public static RichDiagnosticFormatter instance(Context context) {
+        RichDiagnosticFormatter instance = context.get(RichDiagnosticFormatter.class);
+        if (instance == null)
+            instance = new RichDiagnosticFormatter(context);
+        return instance;
+    }
+
+    protected RichDiagnosticFormatter(Context context) {
+        super((AbstractDiagnosticFormatter)Log.instance(context).getDiagnosticFormatter());
+        this.formatter.setPrinter(printer);
+        this.syms = Symtab.instance(context);
+        this.diags = JCDiagnostic.Factory.instance(context);
+        this.types = Types.instance(context);
+        this.messages = JavacMessages.instance(context);
+        whereClauses = new LinkedHashMap<WhereClauseKind, Map<Type, JCDiagnostic>>();
+        configuration = new RichConfiguration(Options.instance(context), formatter);
+        for (WhereClauseKind kind : WhereClauseKind.values())
+            whereClauses.put(kind, new LinkedHashMap<Type, JCDiagnostic>());
+    }
+
+    @Override
+    public String format(JCDiagnostic diag, Locale l) {
+        StringBuilder sb = new StringBuilder();
+        nameSimplifier = new ClassNameSimplifier();
+        for (WhereClauseKind kind : WhereClauseKind.values())
+            whereClauses.get(kind).clear();
+        preprocessDiagnostic(diag);
+        sb.append(formatter.format(diag, l));
+        if (getConfiguration().isEnabled(RichFormatterFeature.WHERE_CLAUSES)) {
+            List<JCDiagnostic> clauses = getWhereClauses();
+            String indent = formatter.isRaw() ? "" :
+                formatter.indentString(DetailsInc);
+            for (JCDiagnostic d : clauses) {
+                String whereClause = formatter.format(d, l);
+                if (whereClause.length() > 0) {
+                    sb.append('\n' + indent + whereClause);
+                }
+            }
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Preprocess a given diagnostic by looking both into its arguments and into
+     * its subdiagnostics (if any). This preprocessing is responsible for
+     * generating info corresponding to features like where clauses, name
+     * simplification, etc.
+     *
+     * @param diag the diagnostic to be preprocessed
+     */
+    protected void preprocessDiagnostic(JCDiagnostic diag) {
+        for (Object o : diag.getArgs()) {
+            if (o != null) {
+                preprocessArgument(o);
+            }
+        }
+        if (diag.isMultiline()) {
+            for (JCDiagnostic d : diag.getSubdiagnostics())
+                preprocessDiagnostic(d);
+        }
+    }
+
+    /**
+     * Preprocess a diagnostic argument. A type/symbol argument is
+     * preprocessed by specialized type/symbol preprocessors.
+     *
+     * @param arg the argument to be translated
+     */
+    protected void preprocessArgument(Object arg) {
+        if (arg instanceof Type) {
+            preprocessType((Type)arg);
+        }
+        else if (arg instanceof Symbol) {
+            preprocessSymbol((Symbol)arg);
+        }
+        else if (arg instanceof JCDiagnostic) {
+            preprocessDiagnostic((JCDiagnostic)arg);
+        }
+        else if (arg instanceof Iterable<?>) {
+            for (Object o : (Iterable<?>)arg) {
+                preprocessArgument(o);
+            }
+        }
+    }
+
+    /**
+     * Build a list of multiline diagnostics containing detailed info about
+     * type-variables, captured types, and intersection types
+     *
+     * @return where clause list
+     */
+    protected List<JCDiagnostic> getWhereClauses() {
+        List<JCDiagnostic> clauses = List.nil();
+        for (WhereClauseKind kind : WhereClauseKind.values()) {
+            List<JCDiagnostic> lines = List.nil();
+            for (Map.Entry<Type, JCDiagnostic> entry : whereClauses.get(kind).entrySet()) {
+                lines = lines.prepend(entry.getValue());
+            }
+            if (!lines.isEmpty()) {
+                String key = kind.key();
+                if (lines.size() > 1)
+                    key += ".1";
+                JCDiagnostic d = diags.fragment(key, whereClauses.get(kind).keySet());
+                d = new JCDiagnostic.MultilineDiagnostic(d, lines.reverse());
+                clauses = clauses.prepend(d);
+            }
+        }
+        return clauses.reverse();
+    }
+    //where
+    /**
+     * This enum defines all posssible kinds of where clauses that can be
+     * attached by a rich diagnostic formatter to a given diagnostic
+     */
+    enum WhereClauseKind {
+
+        /** where clause regarding a type variable */
+        TYPEVAR("where.description.typevar"),
+        /** where clause regarding a captured type */
+        CAPTURED("where.description.captured"),
+        /** where clause regarding an intersection type */
+        INTERSECTION("where.description.intersection");
+
+        /** resource key for this where clause kind */
+        private String key;
+
+        WhereClauseKind(String key) {
+            this.key = key;
+        }
+
+        String key() {
+            return key;
+        }
+    }
+
+    // <editor-fold defaultstate="collapsed" desc="name simplifier">
+    /**
+     * A name simplifier keeps track of class names usages in order to determine
+     * whether a class name can be compacted or not. Short names are not used
+     * if a conflict is detected, e.g. when two classes with the same simple
+     * name belong to different packages - in this case the formatter reverts
+     * to fullnames as compact names might lead to a confusing diagnostic.
+     */
+    class ClassNameSimplifier {
+
+        /* table for keeping track of all short name usages */
+        Map<Name, List<Symbol>> nameClashes = new HashMap<Name, List<Symbol>>();
+
+        /**
+         * Add a name usage to the simplifier's internal cache
+         */
+        protected void addUsage(Symbol sym) {
+            Name n = sym.getSimpleName();
+            List<Symbol> conflicts = nameClashes.get(n);
+            if (conflicts == null) {
+                conflicts = List.nil();
+            }
+            if (!conflicts.contains(sym))
+                nameClashes.put(n, conflicts.append(sym));
+        }
+
+        public String simplify(Symbol s) {
+            String name = s.getQualifiedName().toString();
+            if (!s.type.isCompound()) {
+                List<Symbol> conflicts = nameClashes.get(s.getSimpleName());
+                if (conflicts == null ||
+                    (conflicts.size() == 1 &&
+                    conflicts.contains(s))) {
+                    List<Name> l = List.nil();
+                    Symbol s2 = s;
+                    while (s2.type.getEnclosingType().tag == CLASS
+                            && s2.owner.kind == Kinds.TYP) {
+                        l = l.prepend(s2.getSimpleName());
+                        s2 = s2.owner;
+                    }
+                    l = l.prepend(s2.getSimpleName());
+                    StringBuilder buf = new StringBuilder();
+                    String sep = "";
+                    for (Name n2 : l) {
+                        buf.append(sep);
+                        buf.append(n2);
+                        sep = ".";
+                    }
+                    name = buf.toString();
+                }
+            }
+            return name;
+        }
+    };
+    // </editor-fold>
+
+    // <editor-fold defaultstate="collapsed" desc="rich printer">
+    /**
+     * Enhanced type/symbol printer that provides support for features like simple names
+     * and type variable disambiguation. This enriched printer exploits the info
+     * discovered during type/symbol preprocessing. This printer is set on the delegate
+     * formatter so that rich type/symbol info can be properly rendered.
+     */
+    protected Printer printer = new Printer() {
+
+        @Override
+        public String localize(Locale locale, String key, Object... args) {
+            return formatter.localize(locale, key, args);
+        }
+
+        @Override
+        public String capturedVarId(CapturedType t, Locale locale) {
+            return indexOf(t, WhereClauseKind.CAPTURED) + "";
+        }
+
+        @Override
+        public String visitType(Type t, Locale locale) {
+            String s = super.visitType(t, locale);
+            if (t == syms.botType)
+                s = localize(locale, "compiler.misc.type.null");
+            return s;
+        }
+
+        @Override
+        public String visitCapturedType(CapturedType t, Locale locale) {
+            if (getConfiguration().isEnabled(RichFormatterFeature.WHERE_CLAUSES)) {
+                return localize(locale,
+                    "compiler.misc.captured.type",
+                    indexOf(t, WhereClauseKind.CAPTURED));
+            }
+            else
+                return super.visitCapturedType(t, locale);
+        }
+
+        @Override
+        public String visitClassType(ClassType t, Locale locale) {
+            if (t.isCompound() &&
+                    getConfiguration().isEnabled(RichFormatterFeature.WHERE_CLAUSES)) {
+                return localize(locale,
+                        "compiler.misc.intersection.type",
+                        indexOf(t, WhereClauseKind.INTERSECTION));
+            }
+            else
+                return super.visitClassType(t, locale);
+        }
+
+        @Override
+        protected String className(ClassType t, boolean longform, Locale locale) {
+            Symbol sym = t.tsym;
+            if (sym.name.length() == 0 ||
+                    !getConfiguration().isEnabled(RichFormatterFeature.SIMPLE_NAMES)) {
+                return super.className(t, longform, locale);
+            }
+            else if (longform)
+                return nameSimplifier.simplify(sym).toString();
+            else
+                return sym.name.toString();
+        }
+
+        @Override
+        public String visitTypeVar(TypeVar t, Locale locale) {
+            if (unique(t) ||
+                    !getConfiguration().isEnabled(RichFormatterFeature.UNIQUE_TYPEVAR_NAMES)) {
+                return t.toString();
+            }
+            else {
+                return localize(locale,
+                        "compiler.misc.type.var",
+                        t.toString(), indexOf(t, WhereClauseKind.TYPEVAR));
+            }
+        }
+
+        private int indexOf(Type type, WhereClauseKind kind) {
+            int index = 0;
+            boolean found = false;
+            for (Type t : whereClauses.get(kind).keySet()) {
+                if (t == type) {
+                    found = true;
+                    break;
+                }
+                index++;
+            }
+            if (!found)
+                throw new AssertionError("Missing symbol in where clause " + type);
+            return index + 1;
+        }
+
+        private boolean unique(TypeVar typevar) {
+            int found = 0;
+            for (Type t : whereClauses.get(WhereClauseKind.TYPEVAR).keySet()) {
+                if (t.toString().equals(typevar.toString())) {
+                    found++;
+                }
+            }
+            if (found < 1)
+                throw new AssertionError("Missing type variable in where clause " + typevar);
+            return found == 1;
+        }
+
+        @Override
+        protected String printMethodArgs(List<Type> args, boolean varArgs, Locale locale) {
+            return super.printMethodArgs(args, varArgs, locale);
+        }
+
+        @Override
+        public String visitClassSymbol(ClassSymbol s, Locale locale) {
+            String name = nameSimplifier.simplify(s);
+            if (name.length() == 0 ||
+                    !getConfiguration().isEnabled(RichFormatterFeature.SIMPLE_NAMES)) {
+                return super.visitClassSymbol(s, locale);
+            }
+            else {
+                return name;
+            }
+        }
+
+        @Override
+        public String visitMethodSymbol(MethodSymbol s, Locale locale) {
+            String ownerName = visit(s.owner, locale);
+            if ((s.flags() & BLOCK) != 0) {
+               return ownerName;
+            } else {
+                String ms = (s.name == s.name.table.names.init)
+                    ? ownerName
+                    : s.name.toString();
+                if (s.type != null) {
+                    if (s.type.tag == FORALL) {
+                        ms = "<" + visitTypes(s.type.getTypeArguments(), locale) + ">" + ms;
+                    }
+                    ms += "(" + printMethodArgs(
+                            s.type.getParameterTypes(),
+                            (s.flags() & VARARGS) != 0,
+                            locale) + ")";
+                }
+                return ms;
+            }
+        }
+    };
+    // </editor-fold>
+
+    // <editor-fold defaultstate="collapsed" desc="type scanner">
+    /**
+     * Preprocess a given type looking for (i) additional info (where clauses) to be
+     * added to the main diagnostic (ii) names to be compacted.
+     */
+    protected void preprocessType(Type t) {
+        typePreprocessor.visit(t);
+    }
+    //where
+    protected Types.UnaryVisitor<Void> typePreprocessor =
+            new Types.UnaryVisitor<Void>() {
+
+        public Void visit(List<Type> ts) {
+            for (Type t : ts)
+                visit(t);
+            return null;
+        }
+
+        @Override
+        public Void visitForAll(ForAll t, Void ignored) {
+            visit(t.tvars);
+            visit(t.qtype);
+            return null;
+        }
+
+        @Override
+        public Void visitMethodType(MethodType t, Void ignored) {
+            visit(t.argtypes);
+            visit(t.restype);
+            return null;
+        }
+
+        @Override
+        public Void visitErrorType(ErrorType t, Void ignored) {
+            Type ot = t.getOriginalType();
+            if (ot != null)
+                visit(ot);
+            return null;
+        }
+
+        @Override
+        public Void visitArrayType(ArrayType t, Void ignored) {
+            visit(t.elemtype);
+            return null;
+        }
+
+        @Override
+        public Void visitWildcardType(WildcardType t, Void ignored) {
+            visit(t.type);
+            return null;
+        }
+
+        public Void visitType(Type t, Void ignored) {
+            return null;
+        }
+
+        @Override
+        public Void visitCapturedType(CapturedType t, Void ignored) {
+            if (!whereClauses.get(WhereClauseKind.CAPTURED).containsKey(t)) {
+                String suffix = t.lower == syms.botType ? ".1" : "";
+                JCDiagnostic d = diags.fragment("where.captured"+ suffix, t, t.bound, t.lower, t.wildcard);
+                whereClauses.get(WhereClauseKind.CAPTURED).put(t, d);
+                visit(t.wildcard);
+                visit(t.lower);
+                visit(t.bound);
+            }
+            return null;
+        }
+
+        @Override
+        public Void visitClassType(ClassType t, Void ignored) {
+            if (t.isCompound()) {
+                if (!whereClauses.get(WhereClauseKind.INTERSECTION).containsKey(t)) {
+                    Type supertype = types.supertype(t);
+                    List<Type> interfaces = types.interfaces(t);
+                    JCDiagnostic d = diags.fragment("where.intersection", t, interfaces.prepend(supertype));
+                    whereClauses.get(WhereClauseKind.INTERSECTION).put(t, d);
+                    visit(supertype);
+                    visit(interfaces);
+                }
+            }
+            nameSimplifier.addUsage(t.tsym);
+            visit(t.getTypeArguments());
+            if (t.getEnclosingType() != Type.noType)
+                visit(t.getEnclosingType());
+            return null;
+        }
+
+        @Override
+        public Void visitTypeVar(TypeVar t, Void ignored) {
+            if (!whereClauses.get(WhereClauseKind.TYPEVAR).containsKey(t)) {
+                Type bound = t.bound;
+                while ((bound instanceof ErrorType))
+                    bound = ((ErrorType)bound).getOriginalType();
+                List<Type> bounds  = types.getBounds(t);
+                nameSimplifier.addUsage(t.tsym);
+
+                boolean boundErroneous = bounds.head == null ||
+                                         bounds.head.tag == NONE ||
+                                         bounds.head.tag == ERROR;
+
+
+                JCDiagnostic d = diags.fragment("where.typevar" +
+                        (boundErroneous ? ".1" : ""), t, bounds,
+                        Kinds.kindName(t.tsym.location()), t.tsym.location());
+                whereClauses.get(WhereClauseKind.TYPEVAR).put(t, d);
+                symbolPreprocessor.visit(t.tsym.location(), null);
+                visit(bounds);
+            }
+            return null;
+        }
+    };
+    // </editor-fold>
+
+    // <editor-fold defaultstate="collapsed" desc="symbol scanner">
+    /**
+     * Preprocess a given symbol looking for (i) additional info (where clauses) to be
+     * asdded to the main diagnostic (ii) names to be compacted
+     */
+    protected void preprocessSymbol(Symbol s) {
+        symbolPreprocessor.visit(s, null);
+    }
+    //where
+    protected Types.DefaultSymbolVisitor<Void, Void> symbolPreprocessor =
+            new Types.DefaultSymbolVisitor<Void, Void>() {
+
+        @Override
+        public Void visitClassSymbol(ClassSymbol s, Void ignored) {
+            nameSimplifier.addUsage(s);
+            return null;
+        }
+
+        @Override
+        public Void visitSymbol(Symbol s, Void ignored) {
+            return null;
+        }
+
+        @Override
+        public Void visitMethodSymbol(MethodSymbol s, Void ignored) {
+            visit(s.owner, null);
+            typePreprocessor.visit(s.type);
+            return null;
+        }
+    };
+    // </editor-fold>
+
+    @Override
+    public RichConfiguration getConfiguration() {
+        //the following cast is always safe - see init
+        return (RichConfiguration)configuration;
+    }
+
+    /**
+     * Configuration object provided by the rich formatter.
+     */
+    public static class RichConfiguration extends ForwardingDiagnosticFormatter.ForwardingConfiguration {
+
+        /** set of enabled rich formatter's features */
+        protected java.util.EnumSet<RichFormatterFeature> features;
+
+        @SuppressWarnings("fallthrough")
+        public RichConfiguration(Options options, AbstractDiagnosticFormatter formatter) {
+            super(formatter.getConfiguration());
+            features = formatter.isRaw() ? EnumSet.noneOf(RichFormatterFeature.class) :
+                EnumSet.of(RichFormatterFeature.SIMPLE_NAMES,
+                    RichFormatterFeature.WHERE_CLAUSES,
+                    RichFormatterFeature.UNIQUE_TYPEVAR_NAMES);
+            String diagOpts = options.get("diags");
+            if (diagOpts != null) {
+                for (String args: diagOpts.split(",")) {
+                    if (args.equals("-where")) {
+                        features.remove(RichFormatterFeature.WHERE_CLAUSES);
+                    }
+                    else if (args.equals("where")) {
+                        features.add(RichFormatterFeature.WHERE_CLAUSES);
+                    }
+                    if (args.equals("-simpleNames")) {
+                        features.remove(RichFormatterFeature.SIMPLE_NAMES);
+                    }
+                    else if (args.equals("simpleNames")) {
+                        features.add(RichFormatterFeature.SIMPLE_NAMES);
+                    }
+                    if (args.equals("-disambiguateTvars")) {
+                        features.remove(RichFormatterFeature.UNIQUE_TYPEVAR_NAMES);
+                    }
+                    else if (args.equals("disambiguateTvars")) {
+                        features.add(RichFormatterFeature.UNIQUE_TYPEVAR_NAMES);
+                    }
+                }
+            }
+        }
+
+        /**
+         * Returns a list of all the features supported by the rich formatter.
+         * @return list of supported features
+         */
+        public RichFormatterFeature[] getAvailableFeatures() {
+            return RichFormatterFeature.values();
+        }
+
+        /**
+         * Enable a specific feature on this rich formatter.
+         * @param feature feature to be enabled
+         */
+        public void enable(RichFormatterFeature feature) {
+            features.add(feature);
+        }
+
+        /**
+         * Disable a specific feature on this rich formatter.
+         * @param feature feature to be disabled
+         */
+        public void disable(RichFormatterFeature feature) {
+            features.remove(feature);
+        }
+
+        /**
+         * Is a given feature enabled on this formatter?
+         * @param feature feature to be tested
+         */
+        public boolean isEnabled(RichFormatterFeature feature) {
+            return features.contains(feature);
+        }
+
+        /**
+         * The advanced formatting features provided by the rich formatter
+         */
+        public enum RichFormatterFeature {
+            /** a list of additional info regarding a given type/symbol */
+            WHERE_CLAUSES,
+            /** full class names simplification (where possible) */
+            SIMPLE_NAMES,
+            /** type-variable names disambiguation */
+            UNIQUE_TYPEVAR_NAMES;
+        }
+    }
+}
--- a/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java	Thu Jun 11 21:35:12 2009 -0700
@@ -44,6 +44,9 @@
     protected BasicWriter(Context context) {
         lineWriter = LineWriter.instance(context);
         out = context.get(PrintWriter.class);
+        messages = context.get(Messages.class);
+        if (messages == null)
+            throw new AssertionError();
     }
 
     protected void print(String s) {
@@ -88,8 +91,26 @@
         return "???";
     }
 
+    protected String space(int w) {
+        if (w < spaces.length && spaces[w] != null)
+            return spaces[w];
+
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < w; i++)
+            sb.append(" ");
+
+        String s = sb.toString();
+        if (w < spaces.length)
+            spaces[w] = s;
+
+        return s;
+    }
+
+    private String[] spaces = new String[80];
+
     private LineWriter lineWriter;
     private PrintWriter out;
+    protected Messages messages;
 
     private static class LineWriter {
         static LineWriter instance(Context context) {
--- a/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,9 @@
 package com.sun.tools.javap;
 
 import java.net.URI;
+import java.text.DateFormat;
 import java.util.Collection;
+import java.util.Date;
 import java.util.List;
 
 import com.sun.tools.classfile.AccessFlags;
@@ -47,8 +49,6 @@
 import com.sun.tools.classfile.SourceFile_attribute;
 import com.sun.tools.classfile.Type;
 
-import java.text.DateFormat;
-import java.util.Date;
 import static com.sun.tools.classfile.AccessFlags.*;
 
 /*
--- a/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,6 +25,9 @@
 
 package com.sun.tools.javap;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import com.sun.tools.classfile.AccessFlags;
 import com.sun.tools.classfile.Code_attribute;
 import com.sun.tools.classfile.ConstantPool;
@@ -33,9 +36,6 @@
 import com.sun.tools.classfile.Instruction;
 import com.sun.tools.classfile.Instruction.TypeKind;
 import com.sun.tools.classfile.Method;
-import com.sun.tools.classfile.Opcode;
-
-//import static com.sun.tools.classfile.OpCodes.*;
 
 /*
  *  Write the contents of a Code attribute.
@@ -59,6 +59,12 @@
         attrWriter = AttributeWriter.instance(context);
         classWriter = ClassWriter.instance(context);
         constantWriter = ConstantWriter.instance(context);
+        sourceWriter = SourceWriter.instance(context);
+        tryBlockWriter = TryBlockWriter.instance(context);
+        stackMapWriter = StackMapWriter.instance(context);
+        localVariableTableWriter = LocalVariableTableWriter.instance(context);
+        localVariableTypeTableWriter = LocalVariableTypeTableWriter.instance(context);
+        options = Options.instance(context);
     }
 
     void write(Code_attribute attr, ConstantPool constant_pool) {
@@ -90,14 +96,21 @@
     }
 
     public void writeInstrs(Code_attribute attr) {
+        List<InstructionDetailWriter> detailWriters = getDetailWriters(attr);
+
         for (Instruction instr: attr.getInstructions()) {
             try {
+                for (InstructionDetailWriter w: detailWriters)
+                    w.writeDetails(instr);
                 writeInstr(instr);
             } catch (ArrayIndexOutOfBoundsException e) {
                 println(report("error at or after byte " + instr.getPC()));
                 break;
             }
         }
+
+        for (InstructionDetailWriter w: detailWriters)
+            w.flush();
     }
 
     public void writeInstr(Instruction instr) {
@@ -211,11 +224,45 @@
         print(s);
     }
 
-    private static int align(int n) {
-        return (n + 3) & ~3;
+    private List<InstructionDetailWriter> getDetailWriters(Code_attribute attr) {
+        List<InstructionDetailWriter> detailWriters =
+                new ArrayList<InstructionDetailWriter>();
+        if (options.details.contains(InstructionDetailWriter.Kind.SOURCE)) {
+            sourceWriter.reset(classWriter.getClassFile(), attr);
+            detailWriters.add(sourceWriter);
+        }
+
+        if (options.details.contains(InstructionDetailWriter.Kind.LOCAL_VARS)) {
+            localVariableTableWriter.reset(attr);
+            detailWriters.add(localVariableTableWriter);
+        }
+
+        if (options.details.contains(InstructionDetailWriter.Kind.LOCAL_VAR_TYPES)) {
+            localVariableTypeTableWriter.reset(attr);
+            detailWriters.add(localVariableTypeTableWriter);
+        }
+
+        if (options.details.contains(InstructionDetailWriter.Kind.STACKMAPS)) {
+            stackMapWriter.reset(attr);
+            stackMapWriter.writeInitialDetails();
+            detailWriters.add(stackMapWriter);
+        }
+
+        if (options.details.contains(InstructionDetailWriter.Kind.TRY_BLOCKS)) {
+            tryBlockWriter.reset(attr);
+            detailWriters.add(tryBlockWriter);
+        }
+
+        return detailWriters;
     }
 
     private AttributeWriter attrWriter;
     private ClassWriter classWriter;
     private ConstantWriter constantWriter;
+    private LocalVariableTableWriter localVariableTableWriter;
+    private LocalVariableTypeTableWriter localVariableTypeTableWriter;
+    private SourceWriter sourceWriter;
+    private StackMapWriter stackMapWriter;
+    private TryBlockWriter tryBlockWriter;
+    private Options options;
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javap/InstructionDetailWriter.java	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.tools.javap;
+
+import com.sun.tools.classfile.Instruction;
+
+
+/*
+ *  Write additional details for an instruction.
+ *
+ *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
+ *  you write code that depends on this, you do so at your own risk.
+ *  This code and its internal interfaces are subject to change or
+ *  deletion without notice.</b>
+ */
+public abstract class InstructionDetailWriter extends BasicWriter {
+    public enum Kind {
+        LOCAL_VARS("localVariables"),
+        LOCAL_VAR_TYPES("localVariableTypes"),
+        SOURCE("source"),
+        STACKMAPS("stackMaps"),
+        TRY_BLOCKS("tryBlocks");
+        Kind(String option) {
+            this.option = option;
+        }
+        final String option;
+    }
+    InstructionDetailWriter(Context context) {
+        super(context);
+    }
+
+    abstract void writeDetails(Instruction instr);
+    void flush() { }
+}
--- a/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java	Thu Jun 11 21:35:12 2009 -0700
@@ -39,6 +39,7 @@
 import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -65,7 +66,7 @@
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
-public class JavapTask implements DisassemblerTool.DisassemblerTask {
+public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages {
     public class BadArgs extends Exception {
         static final long serialVersionUID = 8765093759964640721L;
         BadArgs(String key, Object... args) {
@@ -211,9 +212,7 @@
 
         new Option(false, "-Xold") {
             void process(JavapTask task, String opt, String arg) throws BadArgs {
-                // -Xold is only supported as first arg when invoked from
-                // command line; this is handled in Main,main
-                throw task.new BadArgs("err.Xold.not.supported.here");
+                task.log.println(task.getMessage("warn.Xold.not.supported"));
             }
         },
 
@@ -241,6 +240,56 @@
             }
         },
 
+        new Option(false, "-XDdetails") {
+            void process(JavapTask task, String opt, String arg) {
+                task.options.details = EnumSet.allOf(InstructionDetailWriter.Kind.class);
+            }
+
+        },
+
+        new Option(false, "-XDdetails:") {
+            @Override
+            boolean matches(String opt) {
+                int sep = opt.indexOf(":");
+                return sep != -1 && super.matches(opt.substring(0, sep + 1));
+            }
+
+            void process(JavapTask task, String opt, String arg) throws BadArgs {
+                int sep = opt.indexOf(":");
+                for (String v: opt.substring(sep + 1).split("[,: ]+")) {
+                    if (!handleArg(task, v))
+                        throw task.new BadArgs("err.invalid.arg.for.option", v);
+                }
+            }
+
+            boolean handleArg(JavapTask task, String arg) {
+                if (arg.length() == 0)
+                    return true;
+
+                if (arg.equals("all")) {
+                    task.options.details = EnumSet.allOf(InstructionDetailWriter.Kind.class);
+                    return true;
+                }
+
+                boolean on = true;
+                if (arg.startsWith("-")) {
+                    on = false;
+                    arg = arg.substring(1);
+                }
+
+                for (InstructionDetailWriter.Kind k: InstructionDetailWriter.Kind.values()) {
+                    if (arg.equalsIgnoreCase(k.option)) {
+                        if (on)
+                            task.options.details.add(k);
+                        else
+                            task.options.details.remove(k);
+                        return true;
+                    }
+                }
+                return false;
+            }
+        },
+
         new Option(false, "-constants") {
             void process(JavapTask task, String opt, String arg) {
                 task.options.showConstants = true;
@@ -251,6 +300,7 @@
 
     JavapTask() {
         context = new Context();
+        context.put(Messages.class, this);
         options = Options.instance(context);
     }
 
@@ -469,6 +519,8 @@
 
         context.put(PrintWriter.class, log);
         ClassWriter classWriter = ClassWriter.instance(context);
+        SourceWriter sourceWriter = SourceWriter.instance(context);
+        sourceWriter.setFileManager(fileManager);
 
         boolean ok = true;
 
@@ -651,11 +703,11 @@
 
     }
 
-    private String getMessage(String key, Object... args) {
+    public String getMessage(String key, Object... args) {
         return getMessage(task_locale, key, args);
     }
 
-    private String getMessage(Locale locale, String key, Object... args) {
+    public String getMessage(Locale locale, String key, Object... args) {
         if (bundles == null) {
             // could make this a HashMap<Locale,SoftReference<ResourceBundle>>
             // and for efficiency, keep a hard reference to the bundle for the task
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javap/LocalVariableTableWriter.java	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,158 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.tools.javap;
+
+import com.sun.tools.classfile.Attribute;
+import com.sun.tools.classfile.Code_attribute;
+import com.sun.tools.classfile.ConstantPool;
+import com.sun.tools.classfile.ConstantPoolException;
+import com.sun.tools.classfile.Descriptor;
+import com.sun.tools.classfile.Descriptor.InvalidDescriptor;
+import com.sun.tools.classfile.Instruction;
+import com.sun.tools.classfile.LocalVariableTable_attribute;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+
+/**
+ * Annotate instructions with details about local variables.
+ *
+ *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
+ *  you write code that depends on this, you do so at your own risk.
+ *  This code and its internal interfaces are subject to change or
+ *  deletion without notice.</b>
+ */
+public class LocalVariableTableWriter extends  InstructionDetailWriter {
+    public enum NoteKind {
+        START("start") {
+            public boolean match(LocalVariableTable_attribute.Entry entry, int pc) {
+                return (pc == entry.start_pc);
+            }
+        },
+        END("end") {
+            public boolean match(LocalVariableTable_attribute.Entry entry, int pc) {
+                return (pc == entry.start_pc + entry.length);
+            }
+        };
+        NoteKind(String text) {
+            this.text = text;
+        }
+        public abstract boolean match(LocalVariableTable_attribute.Entry entry, int pc);
+        public final String text;
+    };
+
+    static LocalVariableTableWriter instance(Context context) {
+        LocalVariableTableWriter instance = context.get(LocalVariableTableWriter.class);
+        if (instance == null)
+            instance = new LocalVariableTableWriter(context);
+        return instance;
+    }
+
+    protected LocalVariableTableWriter(Context context) {
+        super(context);
+        context.put(LocalVariableTableWriter.class, this);
+        classWriter = ClassWriter.instance(context);
+    }
+
+    public void reset(Code_attribute attr) {
+        codeAttr = attr;
+        pcMap = new HashMap<Integer, List<LocalVariableTable_attribute.Entry>>();
+        LocalVariableTable_attribute lvt =
+                (LocalVariableTable_attribute) (attr.attributes.get(Attribute.LocalVariableTable));
+        if (lvt == null)
+            return;
+
+        for (int i = 0; i < lvt.local_variable_table.length; i++) {
+            LocalVariableTable_attribute.Entry entry = lvt.local_variable_table[i];
+            put(entry.start_pc, entry);
+            put(entry.start_pc + entry.length, entry);
+        }
+    }
+
+    public void writeDetails(Instruction instr) {
+        int pc = instr.getPC();
+        writeLocalVariables(pc, NoteKind.END);
+        writeLocalVariables(pc, NoteKind.START);
+    }
+
+    @Override
+    public void flush() {
+        int pc = codeAttr.code_length;
+        writeLocalVariables(pc, NoteKind.END);
+    }
+
+    public void writeLocalVariables(int pc, NoteKind kind) {
+        ConstantPool constant_pool = classWriter.getClassFile().constant_pool;
+        String indent = space(2); // get from Options?
+        List<LocalVariableTable_attribute.Entry> entries = pcMap.get(pc);
+        if (entries != null) {
+            for (ListIterator<LocalVariableTable_attribute.Entry> iter =
+                    entries.listIterator(kind == NoteKind.END ? entries.size() : 0);
+                    kind == NoteKind.END ? iter.hasPrevious() : iter.hasNext() ; ) {
+                LocalVariableTable_attribute.Entry entry =
+                        kind == NoteKind.END ? iter.previous() : iter.next();
+                if (kind.match(entry, pc)) {
+                    print(indent);
+                    print(kind.text);
+                    print(" local ");
+                    print(entry.index);
+                    print(" // ");
+                    Descriptor d = new Descriptor(entry.descriptor_index);
+                    try {
+                        print(d.getFieldType(constant_pool));
+                    } catch (InvalidDescriptor e) {
+                        print(report(e));
+                    } catch (ConstantPoolException e) {
+                        print(report(e));
+                    }
+                    print(" ");
+                    try {
+                        print(constant_pool.getUTF8Value(entry.name_index));
+                    } catch (ConstantPoolException e) {
+                        print(report(e));
+                    }
+                    println();
+                }
+            }
+        }
+    }
+
+    private void put(int pc, LocalVariableTable_attribute.Entry entry) {
+        List<LocalVariableTable_attribute.Entry> list = pcMap.get(pc);
+        if (list == null) {
+            list = new ArrayList<LocalVariableTable_attribute.Entry>();
+            pcMap.put(pc, list);
+        }
+        if (!list.contains(entry))
+            list.add(entry);
+    }
+
+    private ClassWriter classWriter;
+    private Code_attribute codeAttr;
+    private Map<Integer, List<LocalVariableTable_attribute.Entry>> pcMap;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javap/LocalVariableTypeTableWriter.java	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,159 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.tools.javap;
+
+import com.sun.tools.classfile.Attribute;
+import com.sun.tools.classfile.Code_attribute;
+import com.sun.tools.classfile.ConstantPool;
+import com.sun.tools.classfile.ConstantPoolException;
+import com.sun.tools.classfile.Descriptor;
+import com.sun.tools.classfile.Descriptor.InvalidDescriptor;
+import com.sun.tools.classfile.Instruction;
+import com.sun.tools.classfile.LocalVariableTypeTable_attribute;
+import com.sun.tools.classfile.Signature;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+
+/**
+ * Annotate instructions with details about local variables.
+ *
+ *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
+ *  you write code that depends on this, you do so at your own risk.
+ *  This code and its internal interfaces are subject to change or
+ *  deletion without notice.</b>
+ */
+public class LocalVariableTypeTableWriter extends  InstructionDetailWriter {
+    public enum NoteKind {
+        START("start") {
+            public boolean match(LocalVariableTypeTable_attribute.Entry entry, int pc) {
+                return (pc == entry.start_pc);
+            }
+        },
+        END("end") {
+            public boolean match(LocalVariableTypeTable_attribute.Entry entry, int pc) {
+                return (pc == entry.start_pc + entry.length);
+            }
+        };
+        NoteKind(String text) {
+            this.text = text;
+        }
+        public abstract boolean match(LocalVariableTypeTable_attribute.Entry entry, int pc);
+        public final String text;
+    };
+
+    static LocalVariableTypeTableWriter instance(Context context) {
+        LocalVariableTypeTableWriter instance = context.get(LocalVariableTypeTableWriter.class);
+        if (instance == null)
+            instance = new LocalVariableTypeTableWriter(context);
+        return instance;
+    }
+
+    protected LocalVariableTypeTableWriter(Context context) {
+        super(context);
+        context.put(LocalVariableTypeTableWriter.class, this);
+        classWriter = ClassWriter.instance(context);
+    }
+
+    public void reset(Code_attribute attr) {
+        codeAttr = attr;
+        pcMap = new HashMap<Integer, List<LocalVariableTypeTable_attribute.Entry>>();
+        LocalVariableTypeTable_attribute lvt =
+                (LocalVariableTypeTable_attribute) (attr.attributes.get(Attribute.LocalVariableTypeTable));
+        if (lvt == null)
+            return;
+
+        for (int i = 0; i < lvt.local_variable_table.length; i++) {
+            LocalVariableTypeTable_attribute.Entry entry = lvt.local_variable_table[i];
+            put(entry.start_pc, entry);
+            put(entry.start_pc + entry.length, entry);
+        }
+    }
+
+    public void writeDetails(Instruction instr) {
+        int pc = instr.getPC();
+        writeLocalVariables(pc, NoteKind.END);
+        writeLocalVariables(pc, NoteKind.START);
+    }
+
+    @Override
+    public void flush() {
+        int pc = codeAttr.code_length;
+        writeLocalVariables(pc, NoteKind.END);
+    }
+
+    public void writeLocalVariables(int pc, NoteKind kind) {
+        ConstantPool constant_pool = classWriter.getClassFile().constant_pool;
+        String indent = space(2); // get from Options?
+        List<LocalVariableTypeTable_attribute.Entry> entries = pcMap.get(pc);
+        if (entries != null) {
+            for (ListIterator<LocalVariableTypeTable_attribute.Entry> iter =
+                    entries.listIterator(kind == NoteKind.END ? entries.size() : 0);
+                    kind == NoteKind.END ? iter.hasPrevious() : iter.hasNext() ; ) {
+                LocalVariableTypeTable_attribute.Entry entry =
+                        kind == NoteKind.END ? iter.previous() : iter.next();
+                if (kind.match(entry, pc)) {
+                    print(indent);
+                    print(kind.text);
+                    print(" generic local ");
+                    print(entry.index);
+                    print(" // ");
+                    Descriptor d = new Signature(entry.signature_index);
+                    try {
+                        print(d.getFieldType(constant_pool));
+                    } catch (InvalidDescriptor e) {
+                        print(report(e));
+                    } catch (ConstantPoolException e) {
+                        print(report(e));
+                    }
+                    print(" ");
+                    try {
+                        print(constant_pool.getUTF8Value(entry.name_index));
+                    } catch (ConstantPoolException e) {
+                        print(report(e));
+                    }
+                    println();
+                }
+            }
+        }
+    }
+
+    private void put(int pc, LocalVariableTypeTable_attribute.Entry entry) {
+        List<LocalVariableTypeTable_attribute.Entry> list = pcMap.get(pc);
+        if (list == null) {
+            list = new ArrayList<LocalVariableTypeTable_attribute.Entry>();
+            pcMap.put(pc, list);
+        }
+        if (!list.contains(entry))
+            list.add(entry);
+    }
+
+    private ClassWriter classWriter;
+    private Code_attribute codeAttr;
+    private Map<Integer, List<LocalVariableTypeTable_attribute.Entry>> pcMap;
+}
--- a/langtools/src/share/classes/com/sun/tools/javap/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javap/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -42,13 +42,6 @@
      * @param args command line arguments
      */
     public static void main(String[] args) {
-        if (args.length >= 1 && args[0].equals("-Xold")) {
-            String[] nArgs = new String[args.length - 1];
-            System.arraycopy(args, 1, nArgs, 0, nArgs.length);
-            sun.tools.javap.Main.main(args);  // calls System.exit
-            System.exit(1);
-        }
-
         JavapTask t = new JavapTask();
         int rc = t.run(args);
         System.exit(rc);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javap/Messages.java	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2007-2009 Sun Microsystems, Inc.  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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.tools.javap;
+
+import java.util.Locale;
+
+/**
+ *  Access to javap messages.
+ *
+ *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
+ *  you write code that depends on this, you do so at your own risk.
+ *  This code and its internal interfaces are subject to change or
+ *  deletion without notice.</b>
+ */
+public interface Messages {
+    String getMessage(String key, Object... args);
+
+    String getMessage(Locale locale, String key, Object... args);
+}
--- a/langtools/src/share/classes/com/sun/tools/javap/Options.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javap/Options.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,8 +25,10 @@
 
 package com.sun.tools.javap;
 
+import java.util.EnumSet;
 import java.util.HashSet;
 import java.util.Set;
+
 import com.sun.tools.classfile.AccessFlags;
 
 /*
@@ -77,6 +79,7 @@
     public boolean showLineAndLocalVariableTables;
     public int showAccess;
     public Set<String> accessOptions = new HashSet<String>();
+    public Set<InstructionDetailWriter.Kind> details = EnumSet.noneOf(InstructionDetailWriter.Kind.class);
     public boolean showDisassembled;
     public boolean showInternalSignatures;
     public boolean showAllAttrs;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javap/SourceWriter.java	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,207 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.tools.javap;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.SortedSet;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import javax.tools.JavaFileManager;
+import javax.tools.JavaFileManager.Location;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardLocation;
+
+import com.sun.tools.classfile.Attribute;
+import com.sun.tools.classfile.ClassFile;
+import com.sun.tools.classfile.Code_attribute;
+import com.sun.tools.classfile.ConstantPoolException;
+import com.sun.tools.classfile.Instruction;
+import com.sun.tools.classfile.LineNumberTable_attribute;
+import com.sun.tools.classfile.SourceFile_attribute;
+
+
+/**
+ * Annotate instructions with source code.
+ *
+ *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
+ *  you write code that depends on this, you do so at your own risk.
+ *  This code and its internal interfaces are subject to change or
+ *  deletion without notice.</b>
+ */
+public class SourceWriter extends InstructionDetailWriter {
+    static SourceWriter instance(Context context) {
+        SourceWriter instance = context.get(SourceWriter.class);
+        if (instance == null)
+            instance = new SourceWriter(context);
+        return instance;
+    }
+
+    protected SourceWriter(Context context) {
+        super(context);
+        context.put(SourceWriter.class, this);
+    }
+
+    void setFileManager(JavaFileManager fileManager) {
+        this.fileManager = fileManager;
+    }
+
+    public void reset(ClassFile cf, Code_attribute attr) {
+        setSource(cf);
+        setLineMap(attr);
+    }
+
+    public void writeDetails(Instruction instr) {
+        String indent = space(40); // could get from Options?
+        Set<Integer> lines = lineMap.get(instr.getPC());
+        if (lines != null) {
+            for (int line: lines) {
+                print(indent);
+                print(String.format(" %4d ", line));
+                if (line < sourceLines.length)
+                    print(sourceLines[line]);
+                println();
+                int nextLine = nextLine(line);
+                for (int i = line + 1; i < nextLine; i++) {
+                    print(indent);
+                    print(String.format("(%4d)", i));
+                    if (i < sourceLines.length)
+                        print(sourceLines[i]);
+                    println();
+                }
+            }
+        }
+
+    }
+
+    private void setLineMap(Code_attribute attr) {
+        SortedMap<Integer, SortedSet<Integer>> map =
+                new TreeMap<Integer, SortedSet<Integer>>();
+        SortedSet<Integer> allLines = new TreeSet<Integer>();
+        for (Attribute a: attr.attributes) {
+            if (a instanceof LineNumberTable_attribute) {
+                LineNumberTable_attribute t = (LineNumberTable_attribute) a;
+                for (LineNumberTable_attribute.Entry e: t.line_number_table) {
+                    int start_pc = e.start_pc;
+                    int line = e.line_number;
+                    SortedSet<Integer> pcLines = map.get(start_pc);
+                    if (pcLines == null) {
+                        pcLines = new TreeSet<Integer>();
+                        map.put(start_pc, pcLines);
+                    }
+                    pcLines.add(line);
+                    allLines.add(line);
+                }
+            }
+        }
+        lineMap = map;
+        lineList = new ArrayList<Integer>(allLines);
+    }
+
+    private void setSource(ClassFile cf) {
+        if (cf != classFile) {
+            classFile = cf;
+            sourceLines = splitLines(readSource(cf));
+        }
+    }
+
+    private String readSource(ClassFile cf) {
+        Location location;
+        if (fileManager.hasLocation((StandardLocation.SOURCE_PATH)))
+            location = StandardLocation.SOURCE_PATH;
+        else
+            location = StandardLocation.CLASS_PATH;
+
+        // Guess the source file for a class from the package name for this
+        // class and the base of the source file. This avoids having to read
+        // additional classes to determine the outmost class from any
+        // InnerClasses and EnclosingMethod attributes.
+        try {
+            String className = cf.getName();
+            SourceFile_attribute sf =
+                    (SourceFile_attribute) cf.attributes.get(Attribute.SourceFile);
+            if (sf == null) {
+                report(messages.getMessage("err.no.SourceFile.attribute"));
+                return null;
+            }
+            String sourceFile = sf.getSourceFile(cf.constant_pool);
+            String fileBase = sourceFile.endsWith(".java")
+                ? sourceFile.substring(0, sourceFile.length() - 5) : sourceFile;
+            int sep = className.lastIndexOf("/");
+            String pkgName = (sep == -1 ? "" : className.substring(0, sep+1));
+            String topClassName = (pkgName + fileBase).replace('/', '.');
+            JavaFileObject fo =
+                    fileManager.getJavaFileForInput(location,
+                    topClassName,
+                    JavaFileObject.Kind.SOURCE);
+            if (fo == null) {
+                report(messages.getMessage("err.source.file.not.found"));
+                return null;
+            }
+            return fo.getCharContent(true).toString();
+        } catch (ConstantPoolException e) {
+            report(e);
+            return null;
+        } catch (IOException e) {
+            report(e.getLocalizedMessage());
+            return null;
+        }
+    }
+
+    private static String[] splitLines(String text) {
+        if (text == null)
+            return new String[0];
+
+        List<String> lines = new ArrayList<String>();
+        lines.add(""); // dummy line 0
+        try {
+            BufferedReader r = new BufferedReader(new StringReader(text));
+            String line;
+            while ((line = r.readLine()) != null)
+                lines.add(line);
+        } catch (IOException ignore) {
+        }
+        return lines.toArray(new String[lines.size()]);
+    }
+
+    private int nextLine(int line) {
+        int i = lineList.indexOf(line);
+        if (i == -1 || i == lineList.size() - 1)
+            return - 1;
+        return lineList.get(i + 1);
+    }
+
+    private JavaFileManager fileManager;
+    private ClassFile classFile;
+    private SortedMap<Integer, SortedSet<Integer>> lineMap;
+    private List<Integer> lineList;
+    private String[] sourceLines;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javap/StackMapWriter.java	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,291 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.tools.javap;
+
+import com.sun.tools.classfile.AccessFlags;
+import java.util.HashMap;
+import java.util.Map;
+
+import com.sun.tools.classfile.Attribute;
+import com.sun.tools.classfile.Code_attribute;
+import com.sun.tools.classfile.ConstantPool;
+import com.sun.tools.classfile.ConstantPoolException;
+import com.sun.tools.classfile.Descriptor;
+import com.sun.tools.classfile.Descriptor.InvalidDescriptor;
+import com.sun.tools.classfile.Instruction;
+import com.sun.tools.classfile.Method;
+import com.sun.tools.classfile.StackMapTable_attribute;
+import com.sun.tools.classfile.StackMapTable_attribute.*;
+
+import static com.sun.tools.classfile.StackMapTable_attribute.verification_type_info.*;
+
+/**
+ * Annotate instructions with stack map.
+ *
+ *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
+ *  you write code that depends on this, you do so at your own risk.
+ *  This code and its internal interfaces are subject to change or
+ *  deletion without notice.</b>
+ */
+public class StackMapWriter extends InstructionDetailWriter {
+    static StackMapWriter instance(Context context) {
+        StackMapWriter instance = context.get(StackMapWriter.class);
+        if (instance == null)
+            instance = new StackMapWriter(context);
+        return instance;
+    }
+
+    protected StackMapWriter(Context context) {
+        super(context);
+        context.put(StackMapWriter.class, this);
+        classWriter = ClassWriter.instance(context);
+    }
+
+    public void reset(Code_attribute attr) {
+        setStackMap((StackMapTable_attribute) attr.attributes.get(Attribute.StackMapTable));
+    }
+
+    void setStackMap(StackMapTable_attribute attr) {
+        if (attr == null) {
+            map = null;
+            return;
+        }
+
+        Method m = classWriter.getMethod();
+        Descriptor d = m.descriptor;
+        String[] args;
+        try {
+            ConstantPool cp = classWriter.getClassFile().constant_pool;
+            String argString = d.getParameterTypes(cp);
+            args = argString.substring(1, argString.length() - 1).split("[, ]+");
+        } catch (ConstantPoolException e) {
+            return;
+        } catch (InvalidDescriptor e) {
+            return;
+        }
+        boolean isStatic = m.access_flags.is(AccessFlags.ACC_STATIC);
+
+        verification_type_info[] initialLocals = new verification_type_info[(isStatic ? 0 : 1) + args.length];
+        if (!isStatic)
+            initialLocals[0] = new CustomVerificationTypeInfo("this");
+        for (int i = 0; i < args.length; i++) {
+            initialLocals[(isStatic ? 0 : 1) + i] =
+                    new CustomVerificationTypeInfo(args[i].replace(".", "/"));
+        }
+
+        map = new HashMap<Integer, StackMap>();
+        StackMapBuilder builder = new StackMapBuilder();
+
+        // using -1 as the pc for the initial frame effectively compensates for
+        // the difference in behavior for the first stack map frame (where the
+        // pc offset is just offset_delta) compared to subsequent frames (where
+        // the pc offset is always offset_delta+1).
+        int pc = -1;
+
+        map.put(pc, new StackMap(initialLocals, empty));
+
+        for (int i = 0; i < attr.entries.length; i++)
+            pc = attr.entries[i].accept(builder, pc);
+    }
+
+    public void writeInitialDetails() {
+        writeDetails(-1);
+    }
+
+    public void writeDetails(Instruction instr) {
+        writeDetails(instr.getPC());
+    }
+
+    private void writeDetails(int pc) {
+        if (map == null)
+            return;
+
+        StackMap m = map.get(pc);
+        if (m != null) {
+            print("StackMap locals: ", m.locals);
+            print("StackMap stack: ", m.stack);
+        }
+
+    }
+
+    void print(String label, verification_type_info[] entries) {
+        print(label);
+        for (int i = 0; i < entries.length; i++) {
+            print(" ");
+            print(entries[i]);
+        }
+        println();
+    }
+
+    void print(verification_type_info entry) {
+        if (entry == null) {
+            print("ERROR");
+            return;
+        }
+
+        switch (entry.tag) {
+            case -1:
+                print(((CustomVerificationTypeInfo) entry).text);
+                break;
+
+            case ITEM_Top:
+                print("top");
+                break;
+
+            case ITEM_Integer:
+                print("int");
+                break;
+
+            case ITEM_Float:
+                print("float");
+                break;
+
+            case ITEM_Long:
+                print("long");
+                break;
+
+            case ITEM_Double:
+                print("double");
+                break;
+
+            case ITEM_Null:
+                print("null");
+                break;
+
+            case ITEM_UninitializedThis:
+                print("uninit_this");
+                break;
+
+            case ITEM_Object:
+                try {
+                    ConstantPool cp = classWriter.getClassFile().constant_pool;
+                    ConstantPool.CONSTANT_Class_info class_info = cp.getClassInfo(((Object_variable_info) entry).cpool_index);
+                    print(cp.getUTF8Value(class_info.name_index));
+                } catch (ConstantPoolException e) {
+                    print("??");
+                }
+                break;
+
+            case ITEM_Uninitialized:
+                print(((Uninitialized_variable_info) entry).offset);
+                break;
+        }
+
+    }
+
+    private Map<Integer, StackMap> map;
+    private ClassWriter classWriter;
+
+    class StackMapBuilder
+            implements StackMapTable_attribute.stack_map_frame.Visitor<Integer, Integer> {
+
+        public Integer visit_same_frame(same_frame frame, Integer pc) {
+            int new_pc = pc + frame.getOffsetDelta() + 1;
+            StackMap m = map.get(pc);
+            assert (m != null);
+            map.put(new_pc, m);
+            return new_pc;
+        }
+
+        public Integer visit_same_locals_1_stack_item_frame(same_locals_1_stack_item_frame frame, Integer pc) {
+            int new_pc = pc + frame.getOffsetDelta() + 1;
+            StackMap prev = map.get(pc);
+            assert (prev != null);
+            StackMap m = new StackMap(prev.locals, frame.stack);
+            map.put(new_pc, m);
+            return new_pc;
+        }
+
+        public Integer visit_same_locals_1_stack_item_frame_extended(same_locals_1_stack_item_frame_extended frame, Integer pc) {
+            int new_pc = pc + frame.getOffsetDelta() + 1;
+            StackMap prev = map.get(pc);
+            assert (prev != null);
+            StackMap m = new StackMap(prev.locals, frame.stack);
+            map.put(new_pc, m);
+            return new_pc;
+        }
+
+        public Integer visit_chop_frame(chop_frame frame, Integer pc) {
+            int new_pc = pc + frame.getOffsetDelta() + 1;
+            StackMap prev = map.get(pc);
+            assert (prev != null);
+            int k = 251 - frame.frame_type;
+            verification_type_info[] new_locals = new verification_type_info[prev.locals.length - k];
+            System.arraycopy(prev.locals, 0, new_locals, 0, new_locals.length);
+            StackMap m = new StackMap(new_locals, empty);
+            map.put(new_pc, m);
+            return new_pc;
+        }
+
+        public Integer visit_same_frame_extended(same_frame_extended frame, Integer pc) {
+            int new_pc = pc + frame.getOffsetDelta();
+            StackMap m = map.get(pc);
+            assert (m != null);
+            map.put(new_pc, m);
+            return new_pc;
+        }
+
+        public Integer visit_append_frame(append_frame frame, Integer pc) {
+            int new_pc = pc + frame.getOffsetDelta() + 1;
+            StackMap prev = map.get(pc);
+            assert (prev != null);
+            verification_type_info[] new_locals = new verification_type_info[prev.locals.length + frame.locals.length];
+            System.arraycopy(prev.locals, 0, new_locals, 0, prev.locals.length);
+            System.arraycopy(frame.locals, 0, new_locals, prev.locals.length, frame.locals.length);
+            StackMap m = new StackMap(new_locals, empty);
+            map.put(new_pc, m);
+            return new_pc;
+        }
+
+        public Integer visit_full_frame(full_frame frame, Integer pc) {
+            int new_pc = pc + frame.getOffsetDelta() + 1;
+            StackMap m = new StackMap(frame.locals, frame.stack);
+            map.put(new_pc, m);
+            return new_pc;
+        }
+
+    }
+
+    class StackMap {
+        StackMap(verification_type_info[] locals, verification_type_info[] stack) {
+            this.locals = locals;
+            this.stack = stack;
+        }
+
+        private final verification_type_info[] locals;
+        private final verification_type_info[] stack;
+    }
+
+    class CustomVerificationTypeInfo extends verification_type_info {
+        public CustomVerificationTypeInfo(String text) {
+            super(-1);
+            this.text = text;
+        }
+        private String text;
+    }
+
+    private final verification_type_info[] empty = { };
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javap/TryBlockWriter.java	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,142 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.tools.javap;
+
+import com.sun.tools.classfile.Code_attribute;
+import com.sun.tools.classfile.Code_attribute.Exception_data;
+import com.sun.tools.classfile.Instruction;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+
+/**
+ * Annotate instructions with details about try blocks.
+ *
+ *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
+ *  you write code that depends on this, you do so at your own risk.
+ *  This code and its internal interfaces are subject to change or
+ *  deletion without notice.</b>
+ */
+public class TryBlockWriter extends InstructionDetailWriter {
+    public enum NoteKind {
+        START("try") {
+            public boolean match(Exception_data entry, int pc) {
+                return (pc == entry.start_pc);
+            }
+        },
+        END("end try") {
+            public boolean match(Exception_data entry, int pc) {
+                return (pc == entry.end_pc);
+            }
+        },
+        HANDLER("catch") {
+            public boolean match(Exception_data entry, int pc) {
+                return (pc == entry.handler_pc);
+            }
+        };
+        NoteKind(String text) {
+            this.text = text;
+        }
+        public abstract boolean match(Exception_data entry, int pc);
+        public final String text;
+    };
+
+    static TryBlockWriter instance(Context context) {
+        TryBlockWriter instance = context.get(TryBlockWriter.class);
+        if (instance == null)
+            instance = new TryBlockWriter(context);
+        return instance;
+    }
+
+    protected TryBlockWriter(Context context) {
+        super(context);
+        context.put(TryBlockWriter.class, this);
+        constantWriter = ConstantWriter.instance(context);
+    }
+
+    public void reset(Code_attribute attr) {
+        indexMap = new HashMap<Exception_data, Integer>();
+        pcMap = new HashMap<Integer, List<Exception_data>>();
+        for (int i = 0; i < attr.exception_table.length; i++) {
+            Exception_data entry = attr.exception_table[i];
+            indexMap.put(entry, i);
+            put(entry.start_pc, entry);
+            put(entry.end_pc, entry);
+            put(entry.handler_pc, entry);
+        }
+    }
+
+    public void writeDetails(Instruction instr) {
+        writeTrys(instr, NoteKind.END);
+        writeTrys(instr, NoteKind.START);
+        writeTrys(instr, NoteKind.HANDLER);
+    }
+
+    public void writeTrys(Instruction instr, NoteKind kind) {
+        String indent = space(2); // get from Options?
+        int pc = instr.getPC();
+        List<Exception_data> entries = pcMap.get(pc);
+        if (entries != null) {
+            for (ListIterator<Exception_data> iter =
+                    entries.listIterator(kind == NoteKind.END ? entries.size() : 0);
+                    kind == NoteKind.END ? iter.hasPrevious() : iter.hasNext() ; ) {
+                Exception_data entry =
+                        kind == NoteKind.END ? iter.previous() : iter.next();
+                if (kind.match(entry, pc)) {
+                    print(indent);
+                    print(kind.text);
+                    print("[");
+                    print(indexMap.get(entry));
+                    print("] ");
+                    if (entry.catch_type == 0)
+                        print("finally");
+                    else {
+                        print("#" + entry.catch_type);
+                        print(" // ");
+                        constantWriter.write(entry.catch_type);
+                    }
+                    println();
+                }
+            }
+        }
+    }
+
+    private void put(int pc, Exception_data entry) {
+        List<Exception_data> list = pcMap.get(pc);
+        if (list == null) {
+            list = new ArrayList<Exception_data>();
+            pcMap.put(pc, list);
+        }
+        if (!list.contains(entry))
+            list.add(entry);
+    }
+
+    private Map<Integer, List<Exception_data>> pcMap;
+    private Map<Exception_data, Integer> indexMap;
+    private ConstantWriter constantWriter;
+}
--- a/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties	Thu Jun 11 21:35:12 2009 -0700
@@ -9,13 +9,16 @@
 err.h.not.supported=-h is no longer available - use the 'javah' program
 err.incompatible.options=bad combination of options: {0}
 err.internal.error=internal error: {0} {1} {2}
+err.invalid.arg.for.option=invalid argument for option: {0}
 err.ioerror=IO error reading {0}: {1}
 err.missing.arg=no value given for {0}
 err.no.classes.specified=no classes specified
 err.not.standard.file.manager=can only specify class files when using a standard file manager
 err.unknown.option=unknown option: {0}
 err.verify.not.supported=-verify not supported
-err.Xold.not.supported.here=-Xold must be given as the first option
+err.no.SourceFile.attribute=no SourceFile attribute
+err.source.file.not.found=source file not found
+warn.Xold.not.supported=-Xold is no longer available
 
 main.usage.summary=\
 Usage: {0} <options> <classes>\n\
--- a/langtools/src/share/classes/sun/tools/javap/AttrData.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
- * Copyright 2002 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-
-package sun.tools.javap;
-
-import java.io.*;
-
-/**
- * Reads and stores attribute information.
- *
- * @author  Sucheta Dambalkar (Adopted code from jdis)
- */
-class AttrData {
-    ClassData cls;
-    int name_cpx;
-    int datalen;
-    byte data[];
-
-    public AttrData (ClassData cls) {
-        this.cls=cls;
-    }
-
-    /**
-     * Reads unknown attribute.
-     */
-    public void read(int name_cpx, DataInputStream in) throws IOException {
-        this.name_cpx=name_cpx;
-        datalen=in.readInt();
-        data=new byte[datalen];
-        in.readFully(data);
-    }
-
-    /**
-     * Reads just the name of known attribute.
-     */
-    public void read(int name_cpx){
-        this.name_cpx=name_cpx;
-    }
-
-    /**
-     * Returns attribute name.
-     */
-    public String getAttrName(){
-        return cls.getString(name_cpx);
-    }
-
-    /**
-     * Returns attribute data.
-     */
-    public byte[] getData(){
-        return data;
-    }
-}
--- a/langtools/src/share/classes/sun/tools/javap/CPX.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright 2002 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-package sun.tools.javap;
-
-/**
- * Stores constant pool entry information with one field.
- *
- * @author  Sucheta Dambalkar (Adopted code from jdis)
- */
-class CPX {
-    int cpx;
-
-    CPX (int cpx) {
-        this.cpx=cpx;
-    }
-}
--- a/langtools/src/share/classes/sun/tools/javap/CPX2.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
- * Copyright 2002 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-package sun.tools.javap;
-
-/**
- *  Stores constant pool entry information with two fields.
- *
- * @author  Sucheta Dambalkar (Adopted code from jdis)
- */
-class CPX2 {
-    int cpx1,cpx2;
-
-    CPX2 (int cpx1, int cpx2) {
-        this.cpx1=cpx1;
-        this.cpx2=cpx2;
-    }
-}
--- a/langtools/src/share/classes/sun/tools/javap/ClassData.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,663 +0,0 @@
-/*
- * Copyright 2002-2008 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-package sun.tools.javap;
-
-import java.util.*;
-import java.io.*;
-
-/**
- * Central data repository of the Java Disassembler.
- * Stores all the information in java class file.
- *
- * @author  Sucheta Dambalkar (Adopted code from jdis)
- */
-public class ClassData implements RuntimeConstants {
-
-    private int magic;
-    private int minor_version;
-    private int major_version;
-    private int cpool_count;
-    private Object cpool[];
-    private int access;
-    private int this_class = 0;;
-    private int super_class;
-    private int interfaces_count;
-    private int[] interfaces = new int[0];;
-    private int fields_count;
-    private FieldData[] fields;
-    private int methods_count;
-    private MethodData[] methods;
-    private InnerClassData[] innerClasses;
-    private int attributes_count;
-    private AttrData[] attrs;
-    private String classname;
-    private String superclassname;
-    private int source_cpx=0;
-    private byte tags[];
-    private Hashtable<Object,Integer> indexHashAscii = new Hashtable<Object,Integer>();
-    private String pkgPrefix="";
-    private int pkgPrefixLen=0;
-
-    /**
-     * Read classfile to disassemble.
-     */
-    public ClassData(InputStream infile){
-        try{
-            this.read(new DataInputStream(infile));
-        }catch (FileNotFoundException ee) {
-            error("cant read file");
-        }catch (Error ee) {
-            ee.printStackTrace();
-            error("fatal error");
-        } catch (Exception ee) {
-            ee.printStackTrace();
-            error("fatal exception");
-        }
-    }
-
-    /**
-     * Reads and stores class file information.
-     */
-    public void read(DataInputStream in) throws IOException {
-        // Read the header
-        magic = in.readInt();
-        if (magic != JAVA_MAGIC) {
-            throw new ClassFormatError("wrong magic: " +
-                                       toHex(magic) + ", expected " +
-                                       toHex(JAVA_MAGIC));
-        }
-        minor_version = in.readShort();
-        major_version = in.readShort();
-        if (major_version != JAVA_VERSION) {
-        }
-
-        // Read the constant pool
-        readCP(in);
-        access = in.readUnsignedShort();
-        this_class = in.readUnsignedShort();
-        super_class = in.readUnsignedShort();
-
-        //Read interfaces.
-        interfaces_count = in.readUnsignedShort();
-        if(interfaces_count > 0){
-            interfaces = new int[interfaces_count];
-        }
-        for (int i = 0; i < interfaces_count; i++) {
-            interfaces[i]=in.readShort();
-        }
-
-        // Read the fields
-        readFields(in);
-
-        // Read the methods
-        readMethods(in);
-
-        // Read the attributes
-        attributes_count = in.readUnsignedShort();
-        attrs=new AttrData[attributes_count];
-        for (int k = 0; k < attributes_count; k++) {
-            int name_cpx=in.readUnsignedShort();
-            if (getTag(name_cpx)==CONSTANT_UTF8
-                && getString(name_cpx).equals("SourceFile")
-                ){      if (in.readInt()!=2)
-                    throw new ClassFormatError("invalid attr length");
-                source_cpx=in.readUnsignedShort();
-                AttrData attr=new AttrData(this);
-                attr.read(name_cpx);
-                attrs[k]=attr;
-
-            } else if (getTag(name_cpx)==CONSTANT_UTF8
-                       && getString(name_cpx).equals("InnerClasses")
-                       ){       int length=in.readInt();
-                       int num=in.readUnsignedShort();
-                       if (2+num*8 != length)
-                           throw new ClassFormatError("invalid attr length");
-                       innerClasses=new InnerClassData[num];
-                       for (int j = 0; j < num; j++) {
-                           InnerClassData innerClass=new InnerClassData(this);
-                           innerClass.read(in);
-                           innerClasses[j]=innerClass;
-                       }
-                       AttrData attr=new AttrData(this);
-                       attr.read(name_cpx);
-                       attrs[k]=attr;
-            } else {
-                AttrData attr=new AttrData(this);
-                attr.read(name_cpx, in);
-                attrs[k]=attr;
-            }
-        }
-        in.close();
-    } // end ClassData.read()
-
-    /**
-     * Reads and stores constant pool info.
-     */
-    void readCP(DataInputStream in) throws IOException {
-        cpool_count = in.readUnsignedShort();
-        tags = new byte[cpool_count];
-        cpool = new Object[cpool_count];
-        for (int i = 1; i < cpool_count; i++) {
-            byte tag = in.readByte();
-
-            switch(tags[i] = tag) {
-            case CONSTANT_UTF8:
-                String str=in.readUTF();
-                indexHashAscii.put(cpool[i] = str, i);
-                break;
-            case CONSTANT_INTEGER:
-                cpool[i] = Integer.valueOf(in.readInt());
-                break;
-            case CONSTANT_FLOAT:
-                cpool[i] = Float.valueOf(in.readFloat());
-                break;
-            case CONSTANT_LONG:
-                cpool[i++] = Long.valueOf(in.readLong());
-                break;
-            case CONSTANT_DOUBLE:
-                cpool[i++] = Double.valueOf(in.readDouble());
-                break;
-            case CONSTANT_CLASS:
-            case CONSTANT_STRING:
-                cpool[i] = new CPX(in.readUnsignedShort());
-                break;
-
-            case CONSTANT_FIELD:
-            case CONSTANT_METHOD:
-            case CONSTANT_INTERFACEMETHOD:
-            case CONSTANT_NAMEANDTYPE:
-                cpool[i] = new CPX2(in.readUnsignedShort(), in.readUnsignedShort());
-                break;
-
-            case 0:
-            default:
-                throw new ClassFormatError("invalid constant type: " + (int)tags[i]);
-            }
-        }
-    }
-
-    /**
-     * Reads and strores field info.
-     */
-    protected void readFields(DataInputStream in) throws IOException {
-        int fields_count = in.readUnsignedShort();
-        fields=new FieldData[fields_count];
-        for (int k = 0; k < fields_count; k++) {
-            FieldData field=new FieldData(this);
-            field.read(in);
-            fields[k]=field;
-        }
-    }
-
-    /**
-     * Reads and strores Method info.
-     */
-    protected void readMethods(DataInputStream in) throws IOException {
-        int methods_count = in.readUnsignedShort();
-        methods=new MethodData[methods_count];
-        for (int k = 0; k < methods_count ; k++) {
-            MethodData method=new MethodData(this);
-            method.read(in);
-            methods[k]=method;
-        }
-    }
-
-    /**
-     * get a string
-     */
-    public String getString(int n) {
-        return (n == 0) ? null : (String)cpool[n];
-    }
-
-    /**
-     * get the type of constant given an index
-     */
-    public byte getTag(int n) {
-        try{
-            return tags[n];
-        } catch (ArrayIndexOutOfBoundsException e) {
-            return (byte)100;
-        }
-    }
-
-    static final String hexString="0123456789ABCDEF";
-
-    public static char hexTable[]=hexString.toCharArray();
-
-    static String toHex(long val, int width) {
-        StringBuffer s = new StringBuffer();
-        for (int i=width-1; i>=0; i--)
-            s.append(hexTable[((int)(val>>(4*i)))&0xF]);
-        return "0x"+s.toString();
-    }
-
-    static String toHex(long val) {
-        int width;
-        for (width=16; width>0; width--) {
-            if ((val>>(width-1)*4)!=0) break;
-        }
-        return toHex(val, width);
-    }
-
-    static String toHex(int val) {
-        int width;
-        for (width=8; width>0; width--) {
-            if ((val>>(width-1)*4)!=0) break;
-        }
-        return toHex(val, width);
-    }
-
-    public void error(String msg) {
-        System.err.println("ERROR:" +msg);
-    }
-
-    /**
-     * Returns the name of this class.
-     */
-    public String getClassName() {
-        String res=null;
-        if (this_class==0) {
-            return res;
-        }
-        int tcpx;
-        try {
-            if (tags[this_class]!=CONSTANT_CLASS) {
-                return res; //"<CP["+cpx+"] is not a Class> ";
-            }
-            tcpx=((CPX)cpool[this_class]).cpx;
-        } catch (ArrayIndexOutOfBoundsException e) {
-            return res; // "#"+cpx+"// invalid constant pool index";
-        } catch (Throwable e) {
-            return res; // "#"+cpx+"// ERROR IN DISASSEMBLER";
-        }
-
-        try {
-            return (String)(cpool[tcpx]);
-        } catch (ArrayIndexOutOfBoundsException e) {
-            return  res; // "class #"+scpx+"// invalid constant pool index";
-        } catch (ClassCastException e) {
-            return  res; // "class #"+scpx+"// invalid constant pool reference";
-        } catch (Throwable e) {
-            return res; // "#"+cpx+"// ERROR IN DISASSEMBLER";
-        }
-
-    }
-
-    /**
-     * Returns the name of class at perticular index.
-     */
-    public String getClassName(int cpx) {
-        String res="#"+cpx;
-        if (cpx==0) {
-            return res;
-        }
-        int scpx;
-        try {
-            if (tags[cpx]!=CONSTANT_CLASS) {
-                return res; //"<CP["+cpx+"] is not a Class> ";
-            }
-            scpx=((CPX)cpool[cpx]).cpx;
-        } catch (ArrayIndexOutOfBoundsException e) {
-            return res; // "#"+cpx+"// invalid constant pool index";
-        } catch (Throwable e) {
-            return res; // "#"+cpx+"// ERROR IN DISASSEMBLER";
-        }
-        res="#"+scpx;
-        try {
-            return (String)(cpool[scpx]);
-        } catch (ArrayIndexOutOfBoundsException e) {
-            return  res; // "class #"+scpx+"// invalid constant pool index";
-        } catch (ClassCastException e) {
-            return  res; // "class #"+scpx+"// invalid constant pool reference";
-        } catch (Throwable e) {
-            return res; // "#"+cpx+"// ERROR IN DISASSEMBLER";
-        }
-    }
-
-    /**
-     * Returns true if it is a class
-     */
-    public boolean isClass() {
-        if((access & ACC_INTERFACE) == 0) return true;
-        return false;
-    }
-
-    /**
-     * Returns true if it is a interface.
-     */
-    public boolean isInterface(){
-        if((access & ACC_INTERFACE) != 0) return true;
-        return false;
-    }
-
-    /**
-     * Returns true if this member is public, false otherwise.
-     */
-    public boolean isPublic(){
-        return (access & ACC_PUBLIC) != 0;
-    }
-
-    /**
-     * Returns the access of this class or interface.
-     */
-    public String[] getAccess(){
-        Vector<String> v = new Vector<String>();
-        if ((access & ACC_PUBLIC)   !=0) v.addElement("public");
-        if ((access & ACC_FINAL)    !=0) v.addElement("final");
-        if ((access & ACC_ABSTRACT) !=0) v.addElement("abstract");
-        String[] accflags = new String[v.size()];
-        v.copyInto(accflags);
-        return accflags;
-    }
-
-    /**
-     * Returns list of innerclasses.
-     */
-    public InnerClassData[] getInnerClasses(){
-        return innerClasses;
-    }
-
-    /**
-     * Returns list of attributes.
-     */
-    public AttrData[] getAttributes(){
-        return attrs;
-    }
-
-    /**
-     * Returns true if superbit is set.
-     */
-    public boolean isSuperSet(){
-        if ((access & ACC_SUPER)   !=0) return true;
-        return false;
-    }
-
-    /**
-     * Returns super class name.
-     */
-    public String getSuperClassName(){
-        String res=null;
-        if (super_class==0) {
-            return res;
-        }
-        int scpx;
-        try {
-            if (tags[super_class]!=CONSTANT_CLASS) {
-                return res; //"<CP["+cpx+"] is not a Class> ";
-            }
-            scpx=((CPX)cpool[super_class]).cpx;
-        } catch (ArrayIndexOutOfBoundsException e) {
-            return res; // "#"+cpx+"// invalid constant pool index";
-        } catch (Throwable e) {
-            return res; // "#"+cpx+"// ERROR IN DISASSEMBLER";
-        }
-
-        try {
-            return (String)(cpool[scpx]);
-        } catch (ArrayIndexOutOfBoundsException e) {
-            return  res; // "class #"+scpx+"// invalid constant pool index";
-        } catch (ClassCastException e) {
-            return  res; // "class #"+scpx+"// invalid constant pool reference";
-        } catch (Throwable e) {
-            return res; // "#"+cpx+"// ERROR IN DISASSEMBLER";
-        }
-    }
-
-    /**
-     * Returns list of super interfaces.
-     */
-    public String[] getSuperInterfaces(){
-        String interfacenames[] = new String[interfaces.length];
-        int interfacecpx = -1;
-        for(int i = 0; i < interfaces.length; i++){
-            interfacecpx=((CPX)cpool[interfaces[i]]).cpx;
-            interfacenames[i] = (String)(cpool[interfacecpx]);
-        }
-        return interfacenames;
-    }
-
-    /**
-     * Returns string at prticular constant pool index.
-     */
-    public String getStringValue(int cpoolx) {
-        try {
-            return ((String)cpool[cpoolx]);
-        } catch (ArrayIndexOutOfBoundsException e) {
-            return "//invalid constant pool index:"+cpoolx;
-        } catch (ClassCastException e) {
-            return "//invalid constant pool ref:"+cpoolx;
-        }
-    }
-
-    /**
-     * Returns list of field info.
-     */
-    public  FieldData[] getFields(){
-        return fields;
-    }
-
-    /**
-     * Returns list of method info.
-     */
-    public  MethodData[] getMethods(){
-        return methods;
-    }
-
-    /**
-     * Returns constant pool entry at that index.
-     */
-    public CPX2 getCpoolEntry(int cpx){
-        return ((CPX2)(cpool[cpx]));
-    }
-
-    public Object getCpoolEntryobj(int cpx){
-        return (cpool[cpx]);
-    }
-
-    /**
-     * Returns index of this class.
-     */
-    public int getthis_cpx(){
-        return this_class;
-    }
-
-    public String TagString (int tag) {
-        String res=Tables.tagName(tag);
-        if (res==null)  return "BOGUS_TAG:"+tag;
-        return res;
-    }
-
-    /**
-     * Returns string at that index.
-     */
-    public String StringValue(int cpx) {
-        if (cpx==0) return "#0";
-        int tag;
-        Object x;
-        String suffix="";
-        try {
-            tag=tags[cpx];
-            x=cpool[cpx];
-        } catch (IndexOutOfBoundsException e) {
-            return "<Incorrect CP index:"+cpx+">";
-        }
-
-        if (x==null) return "<NULL>";
-        switch (tag) {
-        case CONSTANT_UTF8: {
-            StringBuffer sb=new StringBuffer();
-            String s=(String)x;
-            for (int k=0; k<s.length(); k++) {
-                char c=s.charAt(k);
-                switch (c) {
-                case '\t': sb.append('\\').append('t'); break;
-                case '\n': sb.append('\\').append('n'); break;
-                case '\r': sb.append('\\').append('r'); break;
-                case '\"': sb.append('\\').append('\"'); break;
-                default: sb.append(c);
-                }
-            }
-            return sb.toString();
-        }
-        case CONSTANT_DOUBLE: {
-            Double d=(Double)x;
-            String sd=d.toString();
-            return sd+"d";
-        }
-        case CONSTANT_FLOAT: {
-            Float f=(Float)x;
-            String sf=(f).toString();
-            return sf+"f";
-        }
-        case CONSTANT_LONG: {
-            Long ln = (Long)x;
-            return ln.toString()+'l';
-        }
-        case CONSTANT_INTEGER: {
-            Integer in = (Integer)x;
-            return in.toString();
-        }
-        case CONSTANT_CLASS:
-            return javaName(getClassName(cpx));
-        case CONSTANT_STRING:
-            return StringValue(((CPX)x).cpx);
-        case CONSTANT_FIELD:
-        case CONSTANT_METHOD:
-        case CONSTANT_INTERFACEMETHOD:
-            //return getShortClassName(((CPX2)x).cpx1)+"."+StringValue(((CPX2)x).cpx2);
-             return javaName(getClassName(((CPX2)x).cpx1))+"."+StringValue(((CPX2)x).cpx2);
-
-        case CONSTANT_NAMEANDTYPE:
-            return getName(((CPX2)x).cpx1)+":"+StringValue(((CPX2)x).cpx2);
-        default:
-            return "UnknownTag"; //TBD
-        }
-    }
-
-    /**
-     * Returns resolved java type name.
-     */
-    public String javaName(String name) {
-        if( name==null) return "null";
-        int len=name.length();
-        if (len==0) return "\"\"";
-        int cc='/';
-    fullname: { // xxx/yyy/zzz
-            int cp;
-            for (int k=0; k<len; k += Character.charCount(cp)) {
-                cp=name.codePointAt(k);
-                if (cc=='/') {
-                    if (!Character.isJavaIdentifierStart(cp)) break fullname;
-                } else if (cp!='/') {
-                    if (!Character.isJavaIdentifierPart(cp)) break fullname;
-                }
-                cc=cp;
-            }
-            return name;
-        }
-        return "\""+name+"\"";
-    }
-
-    public String getName(int cpx) {
-        String res;
-        try {
-            return javaName((String)cpool[cpx]); //.replace('/','.');
-        } catch (ArrayIndexOutOfBoundsException e) {
-            return "<invalid constant pool index:"+cpx+">";
-        } catch (ClassCastException e) {
-            return "<invalid constant pool ref:"+cpx+">";
-        }
-    }
-
-    /**
-     * Returns unqualified class name.
-     */
-    public String getShortClassName(int cpx) {
-        String classname=javaName(getClassName(cpx));
-        pkgPrefixLen=classname.lastIndexOf("/")+1;
-        if (pkgPrefixLen!=0) {
-            pkgPrefix=classname.substring(0,pkgPrefixLen);
-            if (classname.startsWith(pkgPrefix)) {
-                return classname.substring(pkgPrefixLen);
-            }
-        }
-        return classname;
-    }
-
-    /**
-     * Returns source file name.
-     */
-    public String getSourceName(){
-        return getName(source_cpx);
-    }
-
-    /**
-     * Returns package name.
-     */
-    public String getPkgName(){
-        String classname=getClassName(this_class);
-        pkgPrefixLen=classname.lastIndexOf("/")+1;
-        if (pkgPrefixLen!=0) {
-            pkgPrefix=classname.substring(0,pkgPrefixLen);
-            return("package  "+pkgPrefix.substring(0,pkgPrefixLen-1)+";\n");
-        }else return null;
-    }
-
-    /**
-     * Returns total constant pool entry count.
-     */
-    public int getCpoolCount(){
-        return cpool_count;
-    }
-
-    public String StringTag(int cpx) {
-        byte tag=0;
-        String str=null;
-        try {
-            if (cpx==0) throw new IndexOutOfBoundsException();
-            tag=tags[cpx];
-            return      TagString(tag);
-        } catch (IndexOutOfBoundsException e) {
-            str="Incorrect CP index:"+cpx;
-        }
-        return str;
-    }
-
-    /**
-     * Returns minor version of class file.
-     */
-    public int getMinor_version(){
-        return minor_version;
-    }
-
-    /**
-     * Returns major version of class file.
-     */
-    public int getMajor_version(){
-        return major_version;
-    }
-}
--- a/langtools/src/share/classes/sun/tools/javap/Constants.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,372 +0,0 @@
-/*
- * Copyright 2002 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-
-package sun.tools.javap;
-
-/**
- * This interface defines constant that are used
- * throughout the compiler. It inherits from RuntimeConstants,
- * which is an autogenerated class that contains contstants
- * defined in the interpreter.
- */
-
-public
-interface Constants extends RuntimeConstants {
-
-     /**
-     * End of input
-     */
-    public static final int EOF = -1;
-
-   /*
-     * Flags
-     */
-    public static final int F_VERBOSE           = 1 << 0;
-    public static final int F_DUMP              = 1 << 1;
-    public static final int F_WARNINGS          = 1 << 2;
-    public static final int F_DEBUG             = 1 << 3;
-    public static final int F_OPTIMIZE          = 1 << 4;
-    public static final int F_DEPENDENCIES      = 1 << 5;
-
-    /*
-     * Type codes
-     */
-    public static final int TC_BOOLEAN   = 0;
-    public static final int TC_BYTE      = 1;
-    public static final int TC_CHAR      = 2;
-    public static final int TC_SHORT     = 3;
-    public static final int TC_INT       = 4;
-    public static final int TC_LONG      = 5;
-    public static final int TC_FLOAT     = 6;
-    public static final int TC_DOUBLE    = 7;
-    public static final int TC_NULL      = 8;
-    public static final int TC_ARRAY     = 9;
-    public static final int TC_CLASS     = 10;
-    public static final int TC_VOID      = 11;
-    public static final int TC_METHOD    = 12;
-    public static final int TC_ERROR     = 13;
-
-    /*
-     * Type Masks
-     */
-    public static final int TM_NULL      = 1 << TC_NULL;
-    public static final int TM_VOID      = 1 << TC_VOID;
-    public static final int TM_BOOLEAN   = 1 << TC_BOOLEAN;
-    public static final int TM_BYTE      = 1 << TC_BYTE;
-    public static final int TM_CHAR      = 1 << TC_CHAR;
-    public static final int TM_SHORT     = 1 << TC_SHORT;
-    public static final int TM_INT       = 1 << TC_INT;
-    public static final int TM_LONG      = 1 << TC_LONG;
-    public static final int TM_FLOAT     = 1 << TC_FLOAT;
-    public static final int TM_DOUBLE    = 1 << TC_DOUBLE;
-    public static final int TM_ARRAY     = 1 << TC_ARRAY;
-    public static final int TM_CLASS     = 1 << TC_CLASS;
-    public static final int TM_METHOD    = 1 << TC_METHOD;
-    public static final int TM_ERROR     = 1 << TC_ERROR;
-
-    public static final int TM_INT32     = TM_BYTE | TM_SHORT | TM_CHAR | TM_INT;
-    public static final int TM_NUM32     = TM_INT32 | TM_FLOAT;
-    public static final int TM_NUM64     = TM_LONG | TM_DOUBLE;
-    public static final int TM_INTEGER   = TM_INT32 | TM_LONG;
-    public static final int TM_REAL      = TM_FLOAT | TM_DOUBLE;
-    public static final int TM_NUMBER    = TM_INTEGER | TM_REAL;
-    public static final int TM_REFERENCE = TM_ARRAY | TM_CLASS | TM_NULL;
-
-    /*
-     * Class status
-     */
-    public static final int CS_UNDEFINED        = 0;
-    public static final int CS_UNDECIDED        = 1;
-    public static final int CS_BINARY           = 2;
-    public static final int CS_SOURCE           = 3;
-    public static final int CS_PARSED           = 4;
-    public static final int CS_COMPILED         = 5;
-    public static final int CS_NOTFOUND         = 6;
-
-    /*
-     * Attributes
-     */
-    public static final int ATT_ALL             = -1;
-    public static final int ATT_CODE            = 1;
-
-    /*
-     * Number of bits used in file offsets
-     */
-    public static final int OFFSETBITS          = 19;
-    public static final int MAXFILESIZE         = (1 << OFFSETBITS) - 1;
-    public static final int MAXLINENUMBER       = (1 << (32 - OFFSETBITS)) - 1;
-
-    /*
-     * Operators
-     */
-    public final int COMMA              = 0;
-    public final int ASSIGN             = 1;
-
-    public final int ASGMUL             = 2;
-    public final int ASGDIV             = 3;
-    public final int ASGREM             = 4;
-    public final int ASGADD             = 5;
-    public final int ASGSUB             = 6;
-    public final int ASGLSHIFT          = 7;
-    public final int ASGRSHIFT          = 8;
-    public final int ASGURSHIFT         = 9;
-    public final int ASGBITAND          = 10;
-    public final int ASGBITOR           = 11;
-    public final int ASGBITXOR          = 12;
-
-    public final int COND               = 13;
-    public final int OR                 = 14;
-    public final int AND                = 15;
-    public final int BITOR              = 16;
-    public final int BITXOR             = 17;
-    public final int BITAND             = 18;
-    public final int NE                 = 19;
-    public final int EQ                 = 20;
-    public final int GE                 = 21;
-    public final int GT                 = 22;
-    public final int LE                 = 23;
-    public final int LT                 = 24;
-    public final int INSTANCEOF         = 25;
-    public final int LSHIFT             = 26;
-    public final int RSHIFT             = 27;
-    public final int URSHIFT            = 28;
-    public final int ADD                = 29;
-    public final int SUB                = 30;
-    public final int DIV                = 31;
-    public final int REM                = 32;
-    public final int MUL                = 33;
-    public final int CAST               = 34;           // (x)y
-    public final int POS                = 35;           // +x
-    public final int NEG                = 36;           // -x
-    public final int NOT                = 37;
-    public final int BITNOT             = 38;
-    public final int PREINC             = 39;           // ++x
-    public final int PREDEC             = 40;           // --x
-    public final int NEWARRAY           = 41;
-    public final int NEWINSTANCE        = 42;
-    public final int NEWFROMNAME        = 43;
-    public final int POSTINC            = 44;           // x++
-    public final int POSTDEC            = 45;           // x--
-    public final int FIELD              = 46;
-    public final int METHOD             = 47;           // x(y)
-    public final int ARRAYACCESS        = 48;           // x[y]
-    public final int NEW                = 49;
-    public final int INC                = 50;
-    public final int DEC                = 51;
-
-    public final int CONVERT            = 55;           // implicit conversion
-    public final int EXPR               = 56;           // (x)
-    public final int ARRAY              = 57;           // {x, y, ...}
-    public final int GOTO               = 58;
-
-    /*
-     * Value tokens
-     */
-    public final int IDENT              = 60;
-    public final int BOOLEANVAL         = 61;
-    public final int BYTEVAL            = 62;
-    public final int CHARVAL            = 63;
-    public final int SHORTVAL           = 64;
-    public final int INTVAL                     = 65;
-    public final int LONGVAL            = 66;
-    public final int FLOATVAL           = 67;
-    public final int DOUBLEVAL          = 68;
-    public final int STRINGVAL          = 69;
-
-    /*
-     * Type keywords
-     */
-    public final int BYTE               = 70;
-    public final int CHAR               = 71;
-    public final int SHORT              = 72;
-    public final int INT                = 73;
-    public final int LONG               = 74;
-    public final int FLOAT              = 75;
-    public final int DOUBLE             = 76;
-    public final int VOID               = 77;
-    public final int BOOLEAN            = 78;
-
-    /*
-     * Expression keywords
-     */
-    public final int TRUE               = 80;
-    public final int FALSE              = 81;
-    public final int THIS               = 82;
-    public final int SUPER              = 83;
-    public final int NULL               = 84;
-
-    /*
-     * Statement keywords
-     */
-    public final int IF                 = 90;
-    public final int ELSE               = 91;
-    public final int FOR                = 92;
-    public final int WHILE              = 93;
-    public final int DO                 = 94;
-    public final int SWITCH             = 95;
-    public final int CASE               = 96;
-    public final int DEFAULT            = 97;
-    public final int BREAK              = 98;
-    public final int CONTINUE           = 99;
-    public final int RETURN             = 100;
-    public final int TRY                = 101;
-    public final int CATCH              = 102;
-    public final int FINALLY            = 103;
-    public final int THROW              = 104;
-    public final int STAT               = 105;
-    public final int EXPRESSION         = 106;
-    public final int DECLARATION        = 107;
-    public final int VARDECLARATION     = 108;
-
-    /*
-     * Declaration keywords
-     */
-    public final int IMPORT             = 110;
-    public final int CLASS              = 111;
-    public final int EXTENDS            = 112;
-    public final int IMPLEMENTS         = 113;
-    public final int INTERFACE          = 114;
-    public final int PACKAGE            = 115;
-
-    /*
-     * Modifier keywords
-     */
-    public final int PRIVATE    = 120;
-    public final int PUBLIC             = 121;
-    public final int PROTECTED  = 122;
-    public final int CONST              = 123;
-    public final int STATIC             = 124;
-    public final int TRANSIENT          = 125;
-    public final int SYNCHRONIZED       = 126;
-    public final int NATIVE             = 127;
-    public final int FINAL              = 128;
-    public final int VOLATILE   = 129;
-    public final int ABSTRACT   = 130;
-    public final int STRICT             = 165;
-
-    /*
-     * Punctuation
-     */
-    public final int SEMICOLON  = 135;
-    public final int COLON              = 136;
-    public final int QUESTIONMARK       = 137;
-    public final int LBRACE             = 138;
-    public final int RBRACE             = 139;
-    public final int LPAREN             = 140;
-    public final int RPAREN             = 141;
-    public final int LSQBRACKET = 142;
-    public final int RSQBRACKET = 143;
-    public final int THROWS     = 144;
-
-    /*
-     * Special tokens
-     */
-    public final int ERROR              = 145;          // an error
-    public final int COMMENT    = 146;          // not used anymore.
-    public final int TYPE               = 147;
-    public final int LENGTH             = 148;
-    public final int INLINERETURN       = 149;
-    public final int INLINEMETHOD       = 150;
-    public final int INLINENEWINSTANCE  = 151;
-
-    /*
-     * Added for jasm
-     */
-        public final int METHODREF      = 152;
-        public final int FIELDREF       = 153;
-    public final int STACK              = 154;
-    public final int LOCAL              = 155;
-    public final int CPINDEX    = 156;
-    public final int CPNAME             = 157;
-    public final int SIGN               = 158;
-    public final int BITS               = 159;
-    public final int INF                = 160;
-    public final int NAN                = 161;
-    public final int INNERCLASS = 162;
-    public final int OF         = 163;
-    public final int SYNTHETIC          = 164;
-// last used=165;
-
-   /*
-     * Operator precedence
-     */
-    public static final int opPrecedence[] = {
-        10,     11,     11,     11,     11,     11,     11,     11,     11,     11,
-        11,     11,     11,     12,     13,     14,     15,     16,     17,     18,
-        18,     19,     19,     19,     19,     19,     20,     20,     20,     21,
-        21,     22,     22,     22,     23,     24,     24,     24,     24,     24,
-        24,     25,     25,     26,     26,     26,     26,     26,     26
-    };
-
-    /*
-     * Operator names
-     */
-    public static final String opNames[] = {
-        ",",            "=",            "*=",           "/=",           "%=",
-        "+=",           "-=",           "<<=",          ">>=",          "<<<=",
-        "&=",           "|=",           "^=",           "?:",           "||",
-        "&&",           "|",            "^",            "&",            "!=",
-        "==",           ">=",           ">",            "<=",           "<",
-        "instanceof",   "<<",           ">>",           "<<<",          "+",
-        "-",            "/",            "%",            "*",            "cast",
-        "+",            "-",            "!",            "~",            "++",
-        "--",           "new",          "new",          "new",          "++",
-        "--",           "field",        "method",       "[]",           "new",
-        "++",           "--",           null,           null,           null,
-
-        "convert",      "expr",         "array",        "goto",         null,
-
-        "Identifier",   "Boolean",      "Byte",         "Char",         "Short",
-        "Integer",              "Long",         "Float",        "Double",       "String",
-
-        "byte",         "char",         "short",        "int",          "long",
-        "float",        "double",       "void",         "boolean",      null,
-
-        "true",         "false",        "this",         "super",        "null",
-        null,           null,           null,           null,           null,
-
-        "if",           "else",         "for",          "while",        "do",
-        "switch",       "case",         "default",      "break",        "continue",
-        "return",       "try",          "catch",        "finally",      "throw",
-        "stat",         "expression",   "declaration",  "declaration",  null,
-
-        "import",       "class",        "extends",      "implements",   "interface",
-        "package",      null,           null,           null,           null,
-
-        "private",      "public",       "protected",    "const",        "static",
-        "transient",    "synchronized", "native",       "final",        "volatile",
-        "abstract",     null,           null,           null,           null,
-
-        ";",            ":",            "?",            "{",            "}",
-        "(",            ")",            "[",            "]",            "throws",
-        "error",        "comment",      "type",         "length",       "inline-return",
-        "inline-method", "inline-new",
-        "method", "field", "stack", "locals", "CPINDEX", "CPName", "SIGN",
-        "bits", "INF", "NaN", "InnerClass", "of", "synthetic"
-    };
-
-}
--- a/langtools/src/share/classes/sun/tools/javap/FieldData.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,163 +0,0 @@
-/*
- * Copyright 2002-2008 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-package sun.tools.javap;
-
-import java.util.*;
-import java.io.*;
-
-/**
- * Strores field data informastion.
- *
- * @author  Sucheta Dambalkar (Adopted code from jdis)
- */
-
-public class FieldData implements RuntimeConstants  {
-
-    ClassData cls;
-    int access;
-    int name_index;
-    int descriptor_index;
-    int attributes_count;
-    int value_cpx=0;
-    boolean isSynthetic=false;
-    boolean isDeprecated=false;
-    Vector<AttrData> attrs;
-
-    public FieldData(ClassData cls){
-        this.cls=cls;
-    }
-
-    /**
-     * Read and store field info.
-     */
-    public void read(DataInputStream in) throws IOException {
-        access = in.readUnsignedShort();
-        name_index = in.readUnsignedShort();
-        descriptor_index = in.readUnsignedShort();
-        // Read the attributes
-        int attributes_count = in.readUnsignedShort();
-        attrs=new Vector<AttrData>(attributes_count);
-        for (int i = 0; i < attributes_count; i++) {
-            int attr_name_index=in.readUnsignedShort();
-            if (cls.getTag(attr_name_index)!=CONSTANT_UTF8) continue;
-            String attr_name=cls.getString(attr_name_index);
-            if (attr_name.equals("ConstantValue")){
-                if (in.readInt()!=2)
-                    throw new ClassFormatError("invalid ConstantValue attr length");
-                value_cpx=in.readUnsignedShort();
-                AttrData attr=new AttrData(cls);
-                attr.read(attr_name_index);
-                attrs.addElement(attr);
-            } else if (attr_name.equals("Synthetic")){
-                if (in.readInt()!=0)
-                    throw new ClassFormatError("invalid Synthetic attr length");
-                isSynthetic=true;
-                AttrData attr=new AttrData(cls);
-                attr.read(attr_name_index);
-                attrs.addElement(attr);
-            } else if (attr_name.equals("Deprecated")){
-                if (in.readInt()!=0)
-                    throw new ClassFormatError("invalid Synthetic attr length");
-                isDeprecated = true;
-                AttrData attr=new AttrData(cls);
-                attr.read(attr_name_index);
-                attrs.addElement(attr);
-            } else {
-                AttrData attr=new AttrData(cls);
-                attr.read(attr_name_index, in);
-                attrs.addElement(attr);
-            }
-        }
-
-    }  // end read
-
-    /**
-     * Returns access of a field.
-     */
-    public String[] getAccess(){
-        Vector<String> v = new Vector<String>();
-        if ((access & ACC_PUBLIC)   !=0) v.addElement("public");
-        if ((access & ACC_PRIVATE)   !=0) v.addElement("private");
-        if ((access & ACC_PROTECTED)   !=0) v.addElement("protected");
-        if ((access & ACC_STATIC)   !=0) v.addElement("static");
-        if ((access & ACC_FINAL)    !=0) v.addElement("final");
-        if ((access & ACC_VOLATILE) !=0) v.addElement("volatile");
-        if ((access & ACC_TRANSIENT) !=0) v.addElement("transient");
-        String[] accflags = new String[v.size()];
-        v.copyInto(accflags);
-        return accflags;
-    }
-
-    /**
-     * Returns name of a field.
-     */
-    public String getName(){
-        return cls.getStringValue(name_index);
-    }
-
-    /**
-     * Returns internal signature of a field
-     */
-    public String getInternalSig(){
-        return cls.getStringValue(descriptor_index);
-    }
-
-    /**
-     * Returns java type signature of a field.
-     */
-    public String getType(){
-        return new TypeSignature(getInternalSig()).getFieldType();
-    }
-
-    /**
-     * Returns true if field is synthetic.
-     */
-    public boolean isSynthetic(){
-        return isSynthetic;
-    }
-
-    /**
-     * Returns true if field is deprecated.
-     */
-    public boolean isDeprecated(){
-        return isDeprecated;
-    }
-
-    /**
-     * Returns index of constant value in cpool.
-     */
-    public int getConstantValueIndex(){
-        return (value_cpx);
-    }
-
-    /**
-     * Returns list of attributes of field.
-     */
-    public Vector<?> getAttributes(){
-        return attrs;
-    }
-}
--- a/langtools/src/share/classes/sun/tools/javap/InnerClassData.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
- * Copyright 2002-2008 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-package sun.tools.javap;
-
-import java.io.*;
-import java.util.*;
-
-/**
- * Strores InnerClass data informastion.
- *
- * @author  Sucheta Dambalkar (Adopted code from jdis)
- */
-class InnerClassData  implements RuntimeConstants {
-    ClassData cls;
-
-
-    int inner_class_info_index
-        ,outer_class_info_index
-        ,inner_name_index
-        ,access
-        ;
-
-    public InnerClassData(ClassData cls) {
-        this.cls=cls;
-
-    }
-
-    /**
-     * Read Innerclass attribute data.
-     */
-    public void read(DataInputStream in) throws IOException {
-        inner_class_info_index = in.readUnsignedShort();
-        outer_class_info_index = in.readUnsignedShort();
-        inner_name_index = in.readUnsignedShort();
-        access = in.readUnsignedShort();
-    }  // end read
-
-    /**
-     * Returns the access of this class or interface.
-     */
-    public String[] getAccess(){
-        Vector<String> v = new Vector<String>();
-        if ((access & ACC_PUBLIC)   !=0) v.addElement("public");
-        if ((access & ACC_FINAL)    !=0) v.addElement("final");
-        if ((access & ACC_ABSTRACT) !=0) v.addElement("abstract");
-        String[] accflags = new String[v.size()];
-        v.copyInto(accflags);
-        return accflags;
-    }
-
-} // end InnerClassData
--- a/langtools/src/share/classes/sun/tools/javap/JavapEnvironment.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,355 +0,0 @@
-/*
- * Copyright 2002-2006 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-package sun.tools.javap;
-
-import java.util.*;
-import java.io.*;
-import java.util.jar.*;
-
-
-/**
- * Strores flag values according to command line options
- * and sets path where to find classes.
- *
- * @author  Sucheta Dambalkar
- */
-public class JavapEnvironment {
-
-    //Access flags
-    public static final int PRIVATE = 0;
-    public static final int PROTECTED  = 1;
-    public static final int PACKAGE = 2;
-    public static final int PUBLIC  = 3;
-
-    //search path flags.
-    private static final int start = 0;
-    private static final int  cmdboot= 1;
-    private static final int sunboot = 2;
-    private static final int  javaclass= 3;
-    private static final int  cmdextdir= 4;
-    private static final int  javaext= 5;
-    private static final int  cmdclasspath= 6;
-    private static final int  envclasspath= 7;
-    private static final int  javaclasspath= 8;
-    private static final int  currentdir = 9;
-
-
-    // JavapEnvironment flag settings
-    boolean showLineAndLocal = false;
-    int showAccess = PACKAGE;
-    boolean showDisassembled = false;
-    boolean showVerbose = false;
-    boolean showInternalSigs = false;
-    String classPathString = null;
-    String bootClassPathString = null;
-    String extDirsString = null;
-    boolean extDirflag = false;
-    boolean nothingToDo = true;
-    boolean showallAttr = false;
-    String classpath = null;
-    int searchpath = start;
-
-    /**
-     *  According to which flags are set,
-     *  returns file input stream for classfile to disassemble.
-     */
-
-    public InputStream getFileInputStream(String Name){
-        InputStream fileInStream = null;
-        searchpath = cmdboot;
-        try{
-            if(searchpath == cmdboot){
-                if(bootClassPathString != null){
-                    //search in specified bootclasspath.
-                    classpath = bootClassPathString;
-                    if((fileInStream = resolvefilename(Name)) != null) return fileInStream;
-                    //no classes found in search path.
-                    else searchpath = cmdextdir;
-                }
-                else searchpath = sunboot;
-            }
-
-            if(searchpath == sunboot){
-                if(System.getProperty("sun.boot.class.path") != null){
-                    //search in sun.boot.class.path
-                    classpath = System.getProperty("sun.boot.class.path");
-                    if((fileInStream = resolvefilename(Name)) != null) return fileInStream;
-                    //no classes found in search path
-                    else searchpath = cmdextdir;
-                }
-                else searchpath = javaclass;
-            }
-
-            if(searchpath == javaclass){
-                if(System.getProperty("java.class.path") != null){
-                    //search in java.class.path
-                    classpath =System.getProperty("java.class.path");
-                    if((fileInStream = resolvefilename(Name)) != null) return fileInStream;
-                    //no classes found in search path
-                    else searchpath = cmdextdir;
-                }
-                else searchpath = cmdextdir;
-            }
-
-            if(searchpath == cmdextdir){
-                if(extDirsString != null){
-                    //search in specified extdir.
-                    classpath = extDirsString;
-                    extDirflag = true;
-                    if((fileInStream = resolvefilename(Name)) != null) return fileInStream;
-                    //no classes found in search path
-                    else {
-                        searchpath = cmdclasspath;
-                        extDirflag = false;
-                    }
-                }
-                else searchpath = javaext;
-            }
-
-            if(searchpath == javaext){
-                if(System.getProperty("java.ext.dirs") != null){
-                    //search in java.ext.dirs
-                    classpath = System.getProperty("java.ext.dirs");
-                    extDirflag = true;
-                    if((fileInStream = resolvefilename(Name)) != null) return fileInStream;
-                    //no classes found in search path
-                    else {
-                        searchpath = cmdclasspath;
-                        extDirflag = false;
-                    }
-                }
-                else searchpath = cmdclasspath;
-            }
-            if(searchpath == cmdclasspath){
-                if(classPathString != null){
-                    //search in specified classpath.
-                    classpath = classPathString;
-                    if((fileInStream = resolvefilename(Name)) != null) return fileInStream;
-                    //no classes found in search path
-                    else searchpath = 8;
-                }
-                else searchpath = envclasspath;
-            }
-
-            if(searchpath == envclasspath){
-                if(System.getProperty("env.class.path")!= null){
-                    //search in env.class.path
-                    classpath = System.getProperty("env.class.path");
-                    if((fileInStream = resolvefilename(Name)) != null) return fileInStream;
-                    //no classes found in search path.
-                    else searchpath = javaclasspath;
-                }
-                else searchpath = javaclasspath;
-            }
-
-            if(searchpath == javaclasspath){
-                if(("application.home") == null){
-                    //search in java.class.path
-                    classpath = System.getProperty("java.class.path");
-                    if((fileInStream = resolvefilename(Name)) != null) return fileInStream;
-                    //no classes found in search path.
-                    else searchpath = currentdir;
-                }
-                else searchpath = currentdir;
-            }
-
-            if(searchpath == currentdir){
-                classpath = ".";
-                //search in current dir.
-                if((fileInStream = resolvefilename(Name)) != null) return fileInStream;
-                else {
-                    //no classes found in search path.
-                    error("Could not find "+ Name);
-                    System.exit(1);
-                }
-            }
-        }catch(SecurityException excsec){
-            excsec.printStackTrace();
-            error("fatal exception");
-        }catch(NullPointerException excnull){
-            excnull.printStackTrace();
-            error("fatal exception");
-        }catch(IllegalArgumentException excill){
-            excill.printStackTrace();
-            error("fatal exception");
-        }
-
-        return null;
-    }
-
-
-    public void error(String msg) {
-        System.err.println("ERROR:" +msg);
-    }
-
-    /**
-     * Resolves file name for classfile to disassemble.
-     */
-    public InputStream resolvefilename(String name){
-        String classname = name.replace('.', '/') + ".class";
-        while (true) {
-            InputStream instream = extDirflag
-                ? resolveExdirFilename(classname)
-                : resolveclasspath(classname);
-            if (instream != null)
-                return instream;
-            int lastindex = classname.lastIndexOf('/');
-            if (lastindex == -1) return null;
-            classname = classname.substring(0, lastindex) + "$" +
-                classname.substring(lastindex + 1);
-        }
-    }
-
-    /**
-     * Resolves file name for classfile to disassemble if flag exdir is set.
-     */
-    public InputStream resolveExdirFilename(String classname){
-        if(classpath.indexOf(File.pathSeparator) != -1){
-            //separates path
-            StringTokenizer st = new StringTokenizer(classpath, File.pathSeparator);
-            while(st.hasMoreTokens()){
-                String path = st.nextToken();
-                InputStream in = resolveExdirFilenamehelper(path, classname);
-                if (in != null)
-                    return in;
-            }
-        }else return (resolveExdirFilenamehelper(classpath, classname));
-
-        return null;
-    }
-
-    /**
-     * Resolves file name for classfile to disassemble.
-     */
-    public InputStream resolveclasspath(String classname){
-        if(classpath.indexOf(File.pathSeparator) != -1){
-            StringTokenizer st = new StringTokenizer(classpath, File.pathSeparator);
-            //separates path.
-            while(st.hasMoreTokens()){
-                String path = (st.nextToken()).trim();
-                InputStream in = resolveclasspathhelper(path, classname);
-                if(in != null) return in;
-
-            }
-            return null;
-        }
-        else return (resolveclasspathhelper(classpath, classname));
-    }
-
-
-    /**
-     * Returns file input stream for classfile to disassemble if exdir is set.
-     */
-    public InputStream resolveExdirFilenamehelper(String path, String classname){
-        File fileobj = new File(path);
-        if(fileobj.isDirectory()){
-            // gets list of files in that directory.
-            File[] filelist = fileobj.listFiles();
-            for(int i = 0; i < filelist.length; i++){
-                try{
-                    //file is a jar file.
-                    if(filelist[i].toString().endsWith(".jar")){
-                        JarFile jfile = new JarFile(filelist[i]);
-                        if((jfile.getEntry(classname)) != null){
-
-                            InputStream filein = jfile.getInputStream(jfile.getEntry(classname));
-                            int bytearraysize = filein.available();
-                            byte []b =  new byte[bytearraysize];
-                            int totalread = 0;
-                            while(totalread < bytearraysize){
-                                totalread += filein.read(b, totalread, bytearraysize-totalread);
-                            }
-                            InputStream inbyte = new ByteArrayInputStream(b);
-                            filein.close();
-                            return inbyte;
-                        }
-                    } else {
-                        //not a jar file.
-                        String filename = path+"/"+ classname;
-                        File file = new File(filename);
-                        if(file.isFile()){
-                            return (new FileInputStream(file));
-                        }
-                    }
-                }catch(FileNotFoundException fnexce){
-                    fnexce.printStackTrace();
-                    error("cant read file");
-                    error("fatal exception");
-                }catch(IOException ioexc){
-                    ioexc.printStackTrace();
-                    error("fatal exception");
-                }
-            }
-        }
-
-        return null;
-    }
-
-
-    /**
-     * Returns file input stream for classfile to disassemble.
-     */
-    public InputStream resolveclasspathhelper(String path, String classname){
-        File fileobj = new File(path);
-        try{
-            if(fileobj.isDirectory()){
-                //is a directory.
-                String filename = path+"/"+ classname;
-                File file = new File(filename);
-                if(file.isFile()){
-                    return (new FileInputStream(file));
-                }
-
-            }else if(fileobj.isFile()){
-                if(fileobj.toString().endsWith(".jar")){
-                    //is a jar file.
-                    JarFile jfile = new JarFile(fileobj);
-                    if((jfile.getEntry(classname)) != null){
-                        InputStream filein = jfile.getInputStream(jfile.getEntry(classname));
-                        int bytearraysize = filein.available();
-                        byte []b =  new byte[bytearraysize];
-                        int totalread = 0;
-                        while(totalread < bytearraysize){
-                                totalread += filein.read(b, totalread, bytearraysize-totalread);
-                        }
-                        InputStream inbyte = new ByteArrayInputStream(b);
-                        filein.close();
-                         return inbyte;
-                    }
-                }
-            }
-        }catch(FileNotFoundException fnexce){
-            fnexce.printStackTrace();
-            error("cant read file");
-            error("fatal exception");
-        }catch(IOException ioexce){
-            ioexce.printStackTrace();
-            error("fatal exception");
-        }
-        return null;
-    }
-}
--- a/langtools/src/share/classes/sun/tools/javap/JavapPrinter.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,919 +0,0 @@
-/*
- * Copyright 2002-2009 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-package sun.tools.javap;
-
-import java.util.*;
-import java.io.*;
-
-import static sun.tools.javap.RuntimeConstants.*;
-
-/**
- * Program to print information about class files
- *
- * @author  Sucheta Dambalkar
- */
-public class JavapPrinter {
-    JavapEnvironment env;
-    ClassData cls;
-    byte[] code;
-    String lP= "";
-    PrintWriter out;
-
-    public JavapPrinter(InputStream cname, PrintWriter out, JavapEnvironment env){
-        this.out = out;
-        this.cls =  new ClassData(cname);
-        this.env = env;
-    }
-
-    /**
-     *  Entry point to print class file information.
-     */
-    public void print(){
-        printclassHeader();
-        printfields();
-        printMethods();
-        printend();
-    }
-
-    /**
-     * Print a description of the class (not members).
-     */
-    public void printclassHeader(){
-        String srcName="";
-        if ((srcName = cls.getSourceName()) != "null") // requires debug info
-            out.println("Compiled from " + javaclassname(srcName));
-
-        if(cls.isInterface())   {
-            // The only useful access modifier of an interface is
-            // public; interfaces are always marked as abstract and
-            // cannot be final.
-            out.print((cls.isPublic()?"public ":"") +
-                      "interface "+ javaclassname(cls.getClassName()));
-        }
-        else if(cls.isClass()) {
-            String []accflags =  cls.getAccess();
-            printAccess(accflags);
-            out.print("class "+ javaclassname(cls.getClassName()));
-
-            if(cls.getSuperClassName() != null){
-                out.print(" extends " + javaclassname(cls.getSuperClassName()));
-            }
-        }
-
-        String []interfacelist =  cls.getSuperInterfaces();
-        if(interfacelist.length > 0){
-            if(cls.isClass()) {
-                out.print(" implements ");
-            }
-            else if(cls.isInterface()){
-                out.print(" extends ");
-            }
-
-            for(int j = 0; j < interfacelist.length; j++){
-                out.print(javaclassname(interfacelist[j]));
-
-                if((j+1) < interfacelist.length) {
-                    out.print(",");
-                }
-            }
-        }
-
-        // Print class attribute information.
-        if((env.showallAttr) || (env.showVerbose)){
-            printClassAttributes();
-        }
-        // Print verbose output.
-        if(env.showVerbose){
-            printverbosecls();
-        }
-        out.println("{");
-    }
-
-    /**
-     * Print verbose output.
-     */
-    public void printverbosecls(){
-        out.println("  minor version: "+cls.getMinor_version());
-        out.println("  major version: "+cls.getMajor_version());
-        out.println("  Constant pool:");
-        printcp();
-        env.showallAttr = true;
-    }
-
-    /**
-     * Print class attribute information.
-     */
-    public void printClassAttributes(){
-        out.println();
-        AttrData[] clsattrs = cls.getAttributes();
-        for(int i = 0; i < clsattrs.length; i++){
-            String clsattrname = clsattrs[i].getAttrName();
-            if(clsattrname.equals("SourceFile")){
-                out.println("  SourceFile: "+ cls.getSourceName());
-            }else if(clsattrname.equals("InnerClasses")){
-                printInnerClasses();
-            }else {
-                printAttrData(clsattrs[i]);
-            }
-        }
-    }
-
-    /**
-     * Print the fields
-     */
-    public void printfields(){
-        FieldData[] fields = cls.getFields();
-        for(int f = 0; f < fields.length; f++){
-            String[] accflags = fields[f].getAccess();
-            if(checkAccess(accflags)){
-                if(!(env. showLineAndLocal || env.showDisassembled || env.showVerbose
-                     ||  env.showInternalSigs || env.showallAttr)){
-                    out.print("    ");
-                }
-                printAccess(accflags);
-                out.println(fields[f].getType()+" " +fields[f].getName()+";");
-                if (env.showInternalSigs) {
-                    out.println("  Signature: " + (fields[f].getInternalSig()));
-                }
-
-                // print field attribute information.
-                if (env.showallAttr){
-                    printFieldAttributes(fields[f]);
-
-                }
-                if((env.showDisassembled) || (env.showLineAndLocal)){
-                    out.println();
-                }
-            }
-        }
-    }
-
-
-    /* print field attribute information. */
-    public void printFieldAttributes(FieldData field){
-        Vector<?> fieldattrs = field.getAttributes();
-        for(int j = 0; j < fieldattrs.size(); j++){
-            String fieldattrname = ((AttrData)fieldattrs.elementAt(j)).getAttrName();
-            if(fieldattrname.equals("ConstantValue")){
-                printConstantValue(field);
-            }else if (fieldattrname.equals("Deprecated")){
-                out.println("Deprecated: "+ field.isDeprecated());
-            }else if (fieldattrname.equals("Synthetic")){
-                out.println("  Synthetic: "+ field.isSynthetic());
-            }else {
-                printAttrData((AttrData)fieldattrs.elementAt(j));
-            }
-        }
-        out.println();
-    }
-
-    /**
-     * Print the methods
-     */
-    public void printMethods(){
-        MethodData[] methods = cls.getMethods();
-        for(int m = 0; m < methods.length; m++){
-            String[] accflags = methods[m].getAccess();
-            if(checkAccess(accflags)){
-                if(!(env. showLineAndLocal || env.showDisassembled || env.showVerbose
-                     ||  env.showInternalSigs || env.showallAttr)){
-                    out.print("    ");
-                }
-                printMethodSignature(methods[m], accflags);
-                printExceptions(methods[m]);
-                out.println(";");
-
-                // Print internal signature of method.
-                if (env.showInternalSigs){
-                    out.println("  Signature: " + (methods[m].getInternalSig()));
-                }
-
-                //Print disassembled code.
-                if(env.showDisassembled && ! env.showallAttr) {
-                    printcodeSequence(methods[m]);
-                    printExceptionTable(methods[m]);
-                    out.println();
-                }
-
-                // Print line and local variable attribute information.
-                if (env.showLineAndLocal) {
-                    printLineNumTable(methods[m]);
-                    printLocVarTable(methods[m]);
-                    out.println();
-                }
-
-                // Print  method attribute information.
-                if (env.showallAttr){
-                    printMethodAttributes(methods[m]);
-                }
-            }
-        }
-    }
-
-    /**
-     * Print method signature.
-     */
-    public void printMethodSignature(MethodData method, String[] accflags){
-        printAccess(accflags);
-
-        if((method.getName()).equals("<init>")){
-            out.print(javaclassname(cls.getClassName()));
-            out.print(method.getParameters());
-        }else if((method.getName()).equals("<clinit>")){
-            out.print("{}");
-        }else{
-            out.print(method.getReturnType()+" ");
-            out.print(method.getName());
-            out.print(method.getParameters());
-        }
-    }
-
-    /**
-     * print method attribute information.
-     */
-    public void printMethodAttributes(MethodData method){
-        Vector<?> methodattrs = method.getAttributes();
-        Vector<?> codeattrs =  method.getCodeAttributes();
-        for(int k = 0; k < methodattrs.size(); k++){
-            String methodattrname = ((AttrData)methodattrs.elementAt(k)).getAttrName();
-            if(methodattrname.equals("Code")){
-                printcodeSequence(method);
-                printExceptionTable(method);
-                for(int c = 0; c < codeattrs.size(); c++){
-                    String codeattrname = ((AttrData)codeattrs.elementAt(c)).getAttrName();
-                    if(codeattrname.equals("LineNumberTable")){
-                        printLineNumTable(method);
-                    }else if(codeattrname.equals("LocalVariableTable")){
-                        printLocVarTable(method);
-                    }else if(codeattrname.equals("StackMapTable")) {
-                        // Java SE JSR 202 stack map tables
-                        printStackMapTable(method);
-                    }else if(codeattrname.equals("StackMap")) {
-                        // Java ME CLDC stack maps
-                        printStackMap(method);
-                    } else {
-                        printAttrData((AttrData)codeattrs.elementAt(c));
-                    }
-                }
-            }else if(methodattrname.equals("Exceptions")){
-                out.println("  Exceptions: ");
-                printExceptions(method);
-            }else if (methodattrname.equals("Deprecated")){
-                out.println("  Deprecated: "+ method.isDeprecated());
-            }else if (methodattrname.equals("Synthetic")){
-                out.println("  Synthetic: "+ method.isSynthetic());
-            }else {
-                printAttrData((AttrData)methodattrs.elementAt(k));
-            }
-        }
-        out.println();
-    }
-
-    /**
-     * Print exceptions.
-     */
-    public void printExceptions(MethodData method){
-        int []exc_index_table = method.get_exc_index_table();
-        if (exc_index_table != null) {
-            if(!(env. showLineAndLocal || env.showDisassembled || env.showVerbose
-                 ||  env.showInternalSigs || env.showallAttr)){
-                out.print("    ");
-            }
-            out.print("   throws ");
-            int k;
-            int l = exc_index_table.length;
-
-            for (k=0; k<l; k++) {
-                out.print(javaclassname(cls.getClassName(exc_index_table[k])));
-                if (k<l-1) out.print(", ");
-            }
-        }
-    }
-
-    /**
-     * Print code sequence.
-     */
-    public void  printcodeSequence(MethodData method){
-        code = method.getCode();
-        if(code != null){
-            out.println("  Code:");
-            if(env.showVerbose){
-                printVerboseHeader(method);
-            }
-
-            for (int pc=0; pc < code.length; ) {
-                out.print("   "+pc+":\t");
-                pc=pc+printInstr(pc);
-                out.println();
-            }
-        }
-    }
-
-    /**
-     * Print instructions.
-     */
-    public int printInstr(int pc){
-        int opcode = getUbyte(pc);
-        int opcode2;
-        String mnem;
-        switch (opcode) {
-        case opc_nonpriv:
-        case opc_priv:
-            opcode2 = getUbyte(pc+1);
-            mnem=Tables.opcName((opcode<<8)+opcode2);
-            if (mnem==null)
-                // assume all (even nonexistent) priv and nonpriv instructions
-                // are 2 bytes long
-                mnem=Tables.opcName(opcode)+" "+opcode2;
-            out.print(mnem);
-            return 2;
-        case opc_wide: {
-            opcode2 = getUbyte(pc+1);
-            mnem=Tables.opcName((opcode<<8)+opcode2);
-            if (mnem==null) {
-                // nonexistent opcode - but we have to print something
-                out.print("bytecode "+opcode);
-                return 1;
-            }
-            out.print(mnem+" "+getUShort(pc+2));
-            if (opcode2==opc_iinc) {
-                out.print(", "+getShort(pc+4));
-                return 6;
-            }
-            return 4;
-        }
-        }
-        mnem=Tables.opcName(opcode);
-        if (mnem==null) {
-            // nonexistent opcode - but we have to print something
-            out.print("bytecode "+opcode);
-            return 1;
-        }
-        if (opcode>opc_jsr_w) {
-            // pseudo opcodes should be printed as bytecodes
-            out.print("bytecode "+opcode);
-            return 1;
-        }
-        out.print(Tables.opcName(opcode));
-        switch (opcode) {
-        case opc_aload: case opc_astore:
-        case opc_fload: case opc_fstore:
-        case opc_iload: case opc_istore:
-        case opc_lload: case opc_lstore:
-        case opc_dload: case opc_dstore:
-        case opc_ret:
-            out.print("\t"+getUbyte(pc+1));
-            return  2;
-        case opc_iinc:
-            out.print("\t"+getUbyte(pc+1)+", "+getbyte(pc+2));
-            return  3;
-        case opc_tableswitch:{
-            int tb=align(pc+1);
-            int default_skip = getInt(tb); /* default skip pamount */
-            int low = getInt(tb+4);
-            int high = getInt(tb+8);
-            int count = high - low;
-            out.print("{ //"+low+" to "+high);
-            for (int i = 0; i <= count; i++)
-                out.print( "\n\t\t" + (i+low) + ": "+lP+(pc+getInt(tb+12+4*i))+";");
-            out.print("\n\t\tdefault: "+lP+(default_skip + pc) + " }");
-            return tb-pc+16+count*4;
-        }
-
-        case opc_lookupswitch:{
-            int tb=align(pc+1);
-            int default_skip = getInt(tb);
-            int npairs = getInt(tb+4);
-            out.print("{ //"+npairs);
-            for (int i = 1; i <= npairs; i++)
-                out.print("\n\t\t"+getInt(tb+i*8)
-                                 +": "+lP+(pc+getInt(tb+4+i*8))+";"
-                                 );
-            out.print("\n\t\tdefault: "+lP+(default_skip + pc) + " }");
-            return tb-pc+(npairs+1)*8;
-        }
-        case opc_newarray:
-            int type=getUbyte(pc+1);
-            switch (type) {
-            case T_BOOLEAN:out.print(" boolean");break;
-            case T_BYTE:   out.print(" byte");   break;
-            case T_CHAR:   out.print(" char");   break;
-            case T_SHORT:  out.print(" short");  break;
-            case T_INT:    out.print(" int");    break;
-            case T_LONG:   out.print(" long");   break;
-            case T_FLOAT:  out.print(" float");  break;
-            case T_DOUBLE: out.print(" double"); break;
-            case T_CLASS:  out.print(" class"); break;
-            default:       out.print(" BOGUS TYPE:"+type);
-            }
-            return 2;
-
-        case opc_anewarray: {
-            int index =  getUShort(pc+1);
-            out.print("\t#"+index+"; //");
-            PrintConstant(index);
-            return 3;
-        }
-
-        case opc_sipush:
-            out.print("\t"+getShort(pc+1));
-            return 3;
-
-        case opc_bipush:
-            out.print("\t"+getbyte(pc+1));
-            return 2;
-
-        case opc_ldc: {
-            int index = getUbyte(pc+1);
-            out.print("\t#"+index+"; //");
-            PrintConstant(index);
-            return 2;
-        }
-
-        case opc_ldc_w: case opc_ldc2_w:
-        case opc_instanceof: case opc_checkcast:
-        case opc_new:
-        case opc_putstatic: case opc_getstatic:
-        case opc_putfield: case opc_getfield:
-        case opc_invokevirtual:
-        case opc_invokespecial:
-        case opc_invokestatic: {
-            int index = getUShort(pc+1);
-            out.print("\t#"+index+"; //");
-            PrintConstant(index);
-            return 3;
-        }
-
-        case opc_invokeinterface: {
-            int index = getUShort(pc+1), nargs=getUbyte(pc+3);
-            out.print("\t#"+index+",  "+nargs+"; //");
-            PrintConstant(index);
-            return 5;
-        }
-
-        case opc_invokedynamic: {
-            int index = getUShort(pc+1);
-            out.print("\t#"+index+"; //");
-            PrintConstant(index);
-            return 5;
-        }
-
-        case opc_multianewarray: {
-            int index = getUShort(pc+1), dimensions=getUbyte(pc+3);
-            out.print("\t#"+index+",  "+dimensions+"; //");
-            PrintConstant(index);
-            return 4;
-        }
-        case opc_jsr: case opc_goto:
-        case opc_ifeq: case opc_ifge: case opc_ifgt:
-        case opc_ifle: case opc_iflt: case opc_ifne:
-        case opc_if_icmpeq: case opc_if_icmpne: case opc_if_icmpge:
-        case opc_if_icmpgt: case opc_if_icmple: case opc_if_icmplt:
-        case opc_if_acmpeq: case opc_if_acmpne:
-        case opc_ifnull: case opc_ifnonnull:
-            out.print("\t"+lP+(pc + getShort(pc+1)) );
-            return 3;
-
-        case opc_jsr_w:
-        case opc_goto_w:
-            out.print("\t"+lP+(pc + getInt(pc+1)));
-            return 5;
-
-        default:
-            return 1;
-        }
-    }
-    /**
-     * Print code attribute details.
-     */
-    public void printVerboseHeader(MethodData method) {
-        int argCount = method.getArgumentlength();
-        if (!method.isStatic())
-            ++argCount;  // for 'this'
-
-        out.println("   Stack=" + method.getMaxStack()
-                           + ", Locals=" + method.getMaxLocals()
-                           + ", Args_size=" + argCount);
-
-    }
-
-
-    /**
-     * Print the exception table for this method code
-     */
-    void printExceptionTable(MethodData method){//throws IOException
-        Vector<?> exception_table = method.getexception_table();
-        if (exception_table.size() > 0) {
-            out.println("  Exception table:");
-            out.println("   from   to  target type");
-            for (int idx = 0; idx < exception_table.size(); ++idx) {
-                TrapData handler = (TrapData)exception_table.elementAt(idx);
-                printFixedWidthInt(handler.start_pc, 6);
-                printFixedWidthInt(handler.end_pc, 6);
-                printFixedWidthInt(handler.handler_pc, 6);
-                out.print("   ");
-                int catch_cpx = handler.catch_cpx;
-                if (catch_cpx == 0) {
-                    out.println("any");
-                }else {
-                    out.print("Class ");
-                    out.println(cls.getClassName(catch_cpx));
-                    out.println("");
-                }
-            }
-        }
-    }
-
-    /**
-     * Print LineNumberTable attribute information.
-     */
-    public void printLineNumTable(MethodData method) {
-        int numlines = method.getnumlines();
-        Vector<?> lin_num_tb = method.getlin_num_tb();
-        if( lin_num_tb.size() > 0){
-            out.println("  LineNumberTable: ");
-            for (int i=0; i<numlines; i++) {
-                LineNumData linnumtb_entry=(LineNumData)lin_num_tb.elementAt(i);
-                out.println("   line " + linnumtb_entry.line_number + ": "
-                               + linnumtb_entry.start_pc);
-            }
-        }
-        out.println();
-    }
-
-    /**
-     * Print LocalVariableTable attribute information.
-     */
-    public void printLocVarTable(MethodData method){
-        int siz = method.getloc_var_tbsize();
-        if(siz > 0){
-            out.println("  LocalVariableTable: ");
-            out.print("   ");
-            out.println("Start  Length  Slot  Name   Signature");
-        }
-        Vector<?> loc_var_tb = method.getloc_var_tb();
-
-        for (int i=0; i<siz; i++) {
-            LocVarData entry=(LocVarData)loc_var_tb.elementAt(i);
-
-            out.println("   "+entry.start_pc+"      "+entry.length+"      "+
-                               entry.slot+"    "+cls.StringValue(entry.name_cpx)  +
-                               "       "+cls.StringValue(entry.sig_cpx));
-        }
-        out.println();
-    }
-
-    /**
-     * Print StackMap attribute information.
-     */
-    public void printStackMap(MethodData method) {
-        StackMapData[] stack_map_tb = method.getStackMap();
-        int number_of_entries = stack_map_tb.length;
-        if (number_of_entries > 0) {
-            out.println("  StackMap: number_of_entries = " + number_of_entries);
-
-            for (StackMapData frame : stack_map_tb) {
-                frame.print(this);
-            }
-        }
-       out.println();
-    }
-
-    /**
-     * Print StackMapTable attribute information.
-     */
-    public void printStackMapTable(MethodData method) {
-        StackMapTableData[] stack_map_tb = method.getStackMapTable();
-        int number_of_entries = stack_map_tb.length;
-        if (number_of_entries > 0) {
-            out.println("  StackMapTable: number_of_entries = " + number_of_entries);
-
-            for (StackMapTableData frame : stack_map_tb) {
-                frame.print(this);
-            }
-        }
-        out.println();
-    }
-
-    void printMap(String name, int[] map) {
-        out.print(name);
-        for (int i=0; i<map.length; i++) {
-            int fulltype = map[i];
-            int type = fulltype & 0xFF;
-            int argument = fulltype >> 8;
-            switch (type) {
-                case ITEM_Object:
-                    out.print(" ");
-                    PrintConstant(argument);
-                    break;
-                case ITEM_NewObject:
-                    out.print(" " + Tables.mapTypeName(type));
-                    out.print(" " + argument);
-                    break;
-                default:
-                    out.print(" " + Tables.mapTypeName(type));
-            }
-            out.print( (i==(map.length-1)? ' ' : ','));
-        }
-        out.println("]");
-    }
-
-    /**
-     * Print ConstantValue attribute information.
-     */
-    public void printConstantValue(FieldData field){
-        out.print("  Constant value: ");
-        int cpx = (field.getConstantValueIndex());
-        byte tag=0;
-        try {
-            tag=cls.getTag(cpx);
-
-        } catch (IndexOutOfBoundsException e) {
-            out.print("Error:");
-            return;
-        }
-        switch (tag) {
-        case CONSTANT_METHOD:
-        case CONSTANT_INTERFACEMETHOD:
-        case CONSTANT_FIELD: {
-            CPX2 x = cls.getCpoolEntry(cpx);
-            if (x.cpx1 == cls.getthis_cpx()) {
-                // don't print class part for local references
-                cpx=x.cpx2;
-            }
-        }
-        }
-        out.print(cls.TagString(tag)+" "+ cls.StringValue(cpx));
-    }
-
-    /**
-     * Print InnerClass attribute information.
-     */
-    public void printInnerClasses(){//throws ioexception
-
-        InnerClassData[] innerClasses = cls.getInnerClasses();
-        if(innerClasses != null){
-            if(innerClasses.length > 0){
-                out.print("  ");
-                out.println("InnerClass: ");
-                for(int i = 0 ; i < innerClasses.length; i++){
-                    out.print("   ");
-                    //access
-                    String[] accflags = innerClasses[i].getAccess();
-                    if(checkAccess(accflags)){
-                        printAccess(accflags);
-                        if (innerClasses[i].inner_name_index!=0) {
-                            out.print("#"+innerClasses[i].inner_name_index+"= ");
-                        }
-                        out.print("#"+innerClasses[i].inner_class_info_index);
-                        if (innerClasses[i].outer_class_info_index!=0) {
-                            out.print(" of #"+innerClasses[i].outer_class_info_index);
-                        }
-                        out.print("; //");
-                        if (innerClasses[i].inner_name_index!=0) {
-                            out.print(cls.getName(innerClasses[i].inner_name_index)+"=");
-                        }
-                        PrintConstant(innerClasses[i].inner_class_info_index);
-                        if (innerClasses[i].outer_class_info_index!=0) {
-                            out.print(" of ");
-                            PrintConstant(innerClasses[i].outer_class_info_index);
-                        }
-                        out.println();
-                    }
-                }
-
-            }
-        }
-    }
-
-    /**
-     * Print constant pool information.
-     */
-    public void printcp(){
-        int cpx = 1 ;
-
-        while (cpx < cls.getCpoolCount()) {
-            out.print("const #"+cpx+" = ");
-            cpx+=PrintlnConstantEntry(cpx);
-        }
-        out.println();
-    }
-
-    /**
-     * Print constant pool entry information.
-     */
-    @SuppressWarnings("fallthrough")
-    public int PrintlnConstantEntry(int cpx) {
-        int size=1;
-        byte tag=0;
-        try {
-            tag=cls.getTag(cpx);
-        } catch (IndexOutOfBoundsException e) {
-            out.println("  <Incorrect CP index>");
-            return 1;
-        }
-        out.print(cls.StringTag(cpx)+"\t");
-        Object x=cls.getCpoolEntryobj(cpx);
-        if (x==null) {
-            switch (tag) {
-            case CONSTANT_LONG:
-            case CONSTANT_DOUBLE:
-                size=2;
-            }
-            out.println("null;");
-            return size;
-        }
-        String str=cls.StringValue(cpx);
-
-        switch (tag) {
-        case CONSTANT_CLASS:
-        case CONSTANT_STRING:
-            out.println("#"+(((CPX)x).cpx)+";\t//  "+str);
-            break;
-        case CONSTANT_FIELD:
-        case CONSTANT_METHOD:
-        case CONSTANT_INTERFACEMETHOD:
-            out.println("#"+((CPX2)x).cpx1+".#"+((CPX2)x).cpx2+";\t//  "+str);
-            break;
-        case CONSTANT_NAMEANDTYPE:
-            out.println("#"+((CPX2)x).cpx1+":#"+((CPX2)x).cpx2+";//  "+str);
-            break;
-        case CONSTANT_LONG:
-        case CONSTANT_DOUBLE:
-            size=2;
-            // fall through
-        default:
-            out.println(str+";");
-        }
-        return size;
-    }
-
-    /**
-     * Checks access of class, field or method.
-     */
-    public boolean checkAccess(String accflags[]){
-
-        boolean ispublic = false;
-        boolean isprotected = false;
-        boolean isprivate = false;
-        boolean ispackage = false;
-
-        for(int i= 0; i < accflags.length; i++){
-            if(accflags[i].equals("public")) ispublic = true;
-            else if (accflags[i].equals("protected")) isprotected = true;
-            else if (accflags[i].equals("private")) isprivate = true;
-        }
-
-        if(!(ispublic || isprotected || isprivate)) ispackage = true;
-
-        if((env.showAccess == env.PUBLIC) && (isprotected || isprivate || ispackage)) return false;
-        else if((env.showAccess == env.PROTECTED) && (isprivate || ispackage)) return false;
-        else if((env.showAccess == env.PACKAGE) && (isprivate)) return false;
-        else return true;
-    }
-
-    /**
-     * Prints access of class, field or method.
-     */
-    public void printAccess(String []accflags){
-        for(int j = 0; j < accflags.length; j++){
-            out.print(accflags[j]+" ");
-        }
-    }
-
-    /**
-     * Print an integer so that it takes 'length' characters in
-     * the output.  Temporary until formatting code is stable.
-     */
-    public void printFixedWidthInt(long x, int length) {
-        CharArrayWriter baStream = new CharArrayWriter();
-        PrintWriter pStream = new PrintWriter(baStream);
-        pStream.print(x);
-        String str = baStream.toString();
-        for (int cnt = length - str.length(); cnt > 0; --cnt)
-            out.print(' ');
-        out.print(str);
-    }
-
-    protected int getbyte (int pc) {
-        return code[pc];
-    }
-
-    protected int getUbyte (int pc) {
-        return code[pc]&0xFF;
-    }
-
-    int getShort (int pc) {
-        return (code[pc]<<8) | (code[pc+1]&0xFF);
-    }
-
-    int getUShort (int pc) {
-        return ((code[pc]<<8) | (code[pc+1]&0xFF))&0xFFFF;
-    }
-
-    protected int getInt (int pc) {
-        return (getShort(pc)<<16) | (getShort(pc+2)&0xFFFF);
-    }
-
-    /**
-     * Print constant value at that index.
-     */
-    void PrintConstant(int cpx) {
-        if (cpx==0) {
-            out.print("#0");
-            return;
-        }
-        byte tag=0;
-        try {
-            tag=cls.getTag(cpx);
-
-        } catch (IndexOutOfBoundsException e) {
-            out.print("#"+cpx);
-            return;
-        }
-        switch (tag) {
-        case CONSTANT_METHOD:
-        case CONSTANT_INTERFACEMETHOD:
-        case CONSTANT_FIELD: {
-            // CPX2 x=(CPX2)(cpool[cpx]);
-            CPX2 x = cls.getCpoolEntry(cpx);
-            if (x.cpx1 == cls.getthis_cpx()) {
-                // don't print class part for local references
-                cpx=x.cpx2;
-            }
-        }
-        }
-        out.print(cls.TagString(tag)+" "+ cls.StringValue(cpx));
-    }
-
-    protected static int  align (int n) {
-        return (n+3) & ~3 ;
-    }
-
-    public void printend(){
-        out.println("}");
-        out.println();
-    }
-
-    public String javaclassname(String name){
-        return name.replace('/','.');
-    }
-
-    /**
-     * Print attribute data in hex.
-     */
-    public void printAttrData(AttrData attr){
-        byte []data = attr.getData();
-        int i = 0;
-        int j = 0;
-        out.print("  "+attr.getAttrName()+": ");
-        out.println("length = " + cls.toHex(attr.datalen));
-
-        out.print("   ");
-
-
-        while (i < data.length){
-            String databytestring = cls.toHex(data[i]);
-            if(databytestring.equals("0x")) out.print("00");
-            else if(databytestring.substring(2).length() == 1){
-                out.print("0"+databytestring.substring(2));
-            } else{
-                out.print(databytestring.substring(2));
-            }
-
-             j++;
-            if(j == 16) {
-                out.println();
-                out.print("   ");
-                j = 0;
-            }
-            else out.print(" ");
-            i++;
-        }
-        out.println();
-    }
-}
--- a/langtools/src/share/classes/sun/tools/javap/LineNumData.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright 2002 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-package sun.tools.javap;
-
-import java.util.*;
-import java.io.*;
-
-/**
- * Strores LineNumberTable data information.
- *
- * @author  Sucheta Dambalkar (Adopted code from jdis)
- */
-class LineNumData {
-    short start_pc, line_number;
-
-    public LineNumData() {}
-
-    /**
-     * Read LineNumberTable attribute.
-     */
-    public LineNumData(DataInputStream in) throws IOException {
-        start_pc = in.readShort();
-        line_number=in.readShort();
-
-    }
-}
--- a/langtools/src/share/classes/sun/tools/javap/LocVarData.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright 2002 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-package sun.tools.javap;
-
-import java.util.*;
-import java.io.*;
-
-/**
- * Strores LocalVariableTable data information.
- *
- * @author  Sucheta Dambalkar (Adopted code from jdis)
- */
-class LocVarData {
-    short start_pc, length, name_cpx, sig_cpx, slot;
-
-    public LocVarData() {
-    }
-
-    /**
-     * Read LocalVariableTable attribute.
-     */
-    public LocVarData(DataInputStream in) throws IOException {
-        start_pc = in.readShort();
-        length=in.readShort();
-        name_cpx=in.readShort();
-        sig_cpx=in.readShort();
-        slot=in.readShort();
-
-    }
-}
--- a/langtools/src/share/classes/sun/tools/javap/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,224 +0,0 @@
-/*
- * Copyright 2002-2008 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-
-package sun.tools.javap;
-
-import java.util.*;
-import java.io.*;
-
-/**
- * Entry point for javap, class file disassembler.
- *
- * @author  Sucheta Dambalkar (Adopted code from old javap)
- */
-public class Main {
-
-    private Vector<String> classList = new Vector<String>();
-    private PrintWriter out;
-    JavapEnvironment env = new JavapEnvironment();
-    private static boolean errorOccurred = false;
-    private static final String progname = "javap";
-
-
-    public Main(PrintWriter out){
-        this.out = out;
-    }
-
-    public static void main(String argv[]) {
-        // unless first arg is -Xold, use new javap
-        if (!(argv.length >= 1 && argv[0].equals("-Xold"))) {
-            com.sun.tools.javap.Main.main(argv);
-            return;
-        }
-
-        entry(argv);
-        if (errorOccurred) {
-            System.exit(1);
-        }
-    }
-
-
-    /**
-     * Entry point for tool if you don't want System.exit() called.
-     */
-    public static void entry(String argv[]) {
-        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
-        try {
-
-            Main jpmain = new Main(out);
-            jpmain.perform(argv);
-
-        } finally {
-            out.close();
-        }
-    }
-
-    /**
-     * Process the arguments and perform the desired action
-     */
-    private void perform(String argv[]) {
-        if (parseArguments(argv)) {
-            displayResults();
-
-        }
-    }
-
-    private void error(String msg) {
-        errorOccurred = true;
-        System.err.println(msg);
-        System.err.flush();
-    }
-
-    /**
-     * Print usage information
-     */
-    private void usage() {
-        java.io.PrintStream out = System.out;
-        out.println("Usage: " + progname + " <options> <classes>...");
-        out.println();
-        out.println("where options include:");
-        out.println("   -c                        Disassemble the code");
-        out.println("   -classpath <pathlist>     Specify where to find user class files");
-        out.println("   -extdirs <dirs>           Override location of installed extensions");
-        out.println("   -help                     Print this usage message");
-        out.println("   -J<flag>                  Pass <flag> directly to the runtime system");
-        out.println("   -l                        Print line number and local variable tables");
-        out.println("   -public                   Show only public classes and members");
-        out.println("   -protected                Show protected/public classes and members");
-        out.println("   -package                  Show package/protected/public classes");
-        out.println("                             and members (default)");
-        out.println("   -private                  Show all classes and members");
-        out.println("   -s                        Print internal type signatures");
-        out.println("   -bootclasspath <pathlist> Override location of class files loaded");
-        out.println("                             by the bootstrap class loader");
-        out.println("   -verbose                  Print stack size, number of locals and args for methods");
-        out.println("                             If verifying, print reasons for failure");
-        out.println();
-    }
-
-    /**
-     * Parse the command line arguments.
-     * Set flags, construct the class list and create environment.
-     */
-    private boolean parseArguments(String argv[]) {
-        for (int i = 0 ; i < argv.length ; i++) {
-            String arg = argv[i];
-            if (arg.startsWith("-")) {
-                if (arg.equals("-l")) {
-                    env.showLineAndLocal = true;
-                } else if (arg.equals("-private") || arg.equals("-p")) {
-                    env.showAccess = env.PRIVATE;
-                } else if (arg.equals("-package")) {
-                    env.showAccess = env.PACKAGE;
-                } else if (arg.equals("-protected")) {
-                    env.showAccess = env.PROTECTED;
-                } else if (arg.equals("-public")) {
-                    env.showAccess = env.PUBLIC;
-                } else if (arg.equals("-c")) {
-                    env.showDisassembled = true;
-                } else if (arg.equals("-s")) {
-                    env.showInternalSigs = true;
-                } else if (arg.equals("-verbose"))  {
-                    env.showVerbose = true;
-                } else if (arg.equals("-v")) {
-                    env.showVerbose = true;
-                } else if (arg.equals("-h")) {
-                    error("-h is no longer available - use the 'javah' program");
-                    return false;
-                } else if (arg.equals("-verify")) {
-                    error("-verify is no longer available - use 'java -verify'");
-                    return false;
-                } else if (arg.equals("-verify-verbose")) {
-                    error("-verify is no longer available - use 'java -verify'");
-                    return false;
-                } else if (arg.equals("-help")) {
-                    usage();
-                    return false;
-                } else if (arg.equals("-classpath")) {
-                    if ((i + 1) < argv.length) {
-                        env.classPathString = argv[++i];
-                    } else {
-                        error("-classpath requires argument");
-                        usage();
-                        return false;
-                    }
-                } else if (arg.equals("-bootclasspath")) {
-                    if ((i + 1) < argv.length) {
-                        env.bootClassPathString = argv[++i];
-                    } else {
-                        error("-bootclasspath requires argument");
-                        usage();
-                        return false;
-                    }
-                } else if (arg.equals("-extdirs")) {
-                    if ((i + 1) < argv.length) {
-                        env.extDirsString = argv[++i];
-                    } else {
-                        error("-extdirs requires argument");
-                        usage();
-                        return false;
-                    }
-                } else if (arg.equals("-all")) {
-                    env.showallAttr = true;
-                } else if (arg.equals("-Xold")) {
-                    // ignore: this is old javap
-                } else {
-                    error("invalid flag: " + arg);
-                    usage();
-                    return false;
-                }
-            } else {
-                classList.addElement(arg);
-                env.nothingToDo = false;
-            }
-        }
-        if (env.nothingToDo) {
-            System.out.println("No classes were specified on the command line.  Try -help.");
-            errorOccurred = true;
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Display results
-     */
-    private void displayResults() {
-        for (int i = 0; i < classList.size() ; i++ ) {
-            String Name = classList.elementAt(i);
-            InputStream classin = env.getFileInputStream(Name);
-
-            try {
-                JavapPrinter printer = new JavapPrinter(classin, out, env);
-                printer.print();                // actual do display
-
-            } catch (IllegalArgumentException exc) {
-                error(exc.getMessage());
-            }
-        }
-    }
-}
--- a/langtools/src/share/classes/sun/tools/javap/MethodData.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,416 +0,0 @@
-/*
- * Copyright 2002-2008 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-package sun.tools.javap;
-
-import java.util.*;
-import java.io.*;
-
-import static sun.tools.javap.RuntimeConstants.*;
-
-/**
- * Strores method data informastion.
- *
- * @author  Sucheta Dambalkar (Adopted code from jdis)
- */
-public class MethodData {
-
-    ClassData cls;
-    int access;
-    int name_index;
-    int descriptor_index;
-    int attributes_count;
-    byte[] code;
-    Vector<TrapData> exception_table = new Vector<TrapData>(0);
-    Vector<LineNumData> lin_num_tb = new Vector<LineNumData>(0);
-    Vector<LocVarData> loc_var_tb = new Vector<LocVarData>(0);
-    StackMapTableData[] stackMapTable;
-    StackMapData[] stackMap;
-    int[] exc_index_table=null;
-    Vector<AttrData> attrs=new Vector<AttrData>(0);
-    Vector<AttrData> code_attrs=new Vector<AttrData>(0);
-    int max_stack,  max_locals;
-    boolean isSynthetic=false;
-    boolean isDeprecated=false;
-
-    public MethodData(ClassData cls){
-        this.cls=cls;
-    }
-
-    /**
-     * Read method info.
-     */
-    public void read(DataInputStream in) throws IOException {
-        access = in.readUnsignedShort();
-        name_index=in.readUnsignedShort();
-        descriptor_index =in.readUnsignedShort();
-        int attributes_count = in.readUnsignedShort();
-        for (int i = 0; i < attributes_count; i++) {
-            int attr_name_index=in.readUnsignedShort();
-
-        readAttr: {
-                if (cls.getTag(attr_name_index)==CONSTANT_UTF8) {
-                    String  attr_name=cls.getString(attr_name_index);
-                    if ( attr_name.equals("Code")){
-                        readCode (in);
-                        AttrData attr=new AttrData(cls);
-                        attr.read(attr_name_index);
-                        attrs.addElement(attr);
-                        break readAttr;
-                    } else if ( attr_name.equals("Exceptions")){
-                        readExceptions(in);
-                        AttrData attr=new AttrData(cls);
-                        attr.read(attr_name_index);
-                        attrs.addElement(attr);
-                        break readAttr;
-                    } else if (attr_name.equals("Synthetic")){
-                        if (in.readInt()!=0)
-                            throw new ClassFormatError("invalid Synthetic attr length");
-                        isSynthetic=true;
-                        AttrData attr=new AttrData(cls);
-                        attr.read(attr_name_index);
-                        attrs.addElement(attr);
-                        break readAttr;
-                    } else if (attr_name.equals("Deprecated")){
-                        if (in.readInt()!=0)
-                            throw new ClassFormatError("invalid Synthetic attr length");
-                        isDeprecated = true;
-                        AttrData attr=new AttrData(cls);
-                        attr.read(attr_name_index);
-                        attrs.addElement(attr);
-                        break readAttr;
-                    }
-                }
-                AttrData attr=new AttrData(cls);
-                attr.read(attr_name_index, in);
-                attrs.addElement(attr);
-            }
-        }
-    }
-
-    /**
-     * Read code attribute info.
-     */
-    public void readCode(DataInputStream in) throws IOException {
-
-        int attr_length = in.readInt();
-        max_stack=in.readUnsignedShort();
-        max_locals=in.readUnsignedShort();
-        int codelen=in.readInt();
-
-        code=new byte[codelen];
-        int totalread = 0;
-        while(totalread < codelen){
-            totalread += in.read(code, totalread, codelen-totalread);
-        }
-        //      in.read(code, 0, codelen);
-        int clen = 0;
-        readExceptionTable(in);
-        int code_attributes_count = in.readUnsignedShort();
-
-        for (int k = 0 ; k < code_attributes_count ; k++) {
-            int table_name_index=in.readUnsignedShort();
-            int table_name_tag=cls.getTag(table_name_index);
-            AttrData attr=new AttrData(cls);
-            if (table_name_tag==CONSTANT_UTF8) {
-                String table_name_tstr=cls.getString(table_name_index);
-                if (table_name_tstr.equals("LineNumberTable")) {
-                    readLineNumTable(in);
-                    attr.read(table_name_index);
-                } else if (table_name_tstr.equals("LocalVariableTable")) {
-                    readLocVarTable(in);
-                    attr.read(table_name_index);
-                } else if (table_name_tstr.equals("StackMapTable")) {
-                    readStackMapTable(in);
-                    attr.read(table_name_index);
-                } else if (table_name_tstr.equals("StackMap")) {
-                    readStackMap(in);
-                    attr.read(table_name_index);
-                } else {
-                    attr.read(table_name_index, in);
-                }
-                code_attrs.addElement(attr);
-                continue;
-            }
-
-            attr.read(table_name_index, in);
-            code_attrs.addElement(attr);
-        }
-    }
-
-    /**
-     * Read exception table info.
-     */
-    void readExceptionTable (DataInputStream in) throws IOException {
-        int exception_table_len=in.readUnsignedShort();
-        exception_table=new Vector<TrapData>(exception_table_len);
-        for (int l = 0; l < exception_table_len; l++) {
-            exception_table.addElement(new TrapData(in, l));
-        }
-    }
-
-    /**
-     * Read LineNumberTable attribute info.
-     */
-    void readLineNumTable (DataInputStream in) throws IOException {
-        int attr_len = in.readInt(); // attr_length
-        int lin_num_tb_len = in.readUnsignedShort();
-        lin_num_tb=new Vector<LineNumData>(lin_num_tb_len);
-        for (int l = 0; l < lin_num_tb_len; l++) {
-            lin_num_tb.addElement(new LineNumData(in));
-        }
-    }
-
-    /**
-     * Read LocalVariableTable attribute info.
-     */
-    void readLocVarTable (DataInputStream in) throws IOException {
-        int attr_len=in.readInt(); // attr_length
-        int loc_var_tb_len = in.readUnsignedShort();
-        loc_var_tb = new Vector<LocVarData>(loc_var_tb_len);
-        for (int l = 0; l < loc_var_tb_len; l++) {
-            loc_var_tb.addElement(new LocVarData(in));
-        }
-    }
-
-    /**
-     * Read Exception attribute info.
-     */
-    public void readExceptions(DataInputStream in) throws IOException {
-        int attr_len=in.readInt(); // attr_length in prog
-        int num_exceptions = in.readUnsignedShort();
-        exc_index_table=new int[num_exceptions];
-        for (int l = 0; l < num_exceptions; l++) {
-            int exc=in.readShort();
-            exc_index_table[l]=exc;
-        }
-    }
-
-    /**
-     * Read StackMapTable attribute info.
-     */
-    void readStackMapTable(DataInputStream in) throws IOException {
-        int attr_len = in.readInt();  //attr_length
-        int stack_map_tb_len = in.readUnsignedShort();
-        stackMapTable = new StackMapTableData[stack_map_tb_len];
-        for (int i=0; i<stack_map_tb_len; i++) {
-            stackMapTable[i] = StackMapTableData.getInstance(in, this);
-        }
-    }
-
-    /**
-     * Read StackMap attribute info.
-     */
-    void readStackMap(DataInputStream in) throws IOException {
-        int attr_len = in.readInt();  //attr_length
-        int stack_map_len = in.readUnsignedShort();
-        stackMap = new StackMapData[stack_map_len];
-        for (int i = 0; i<stack_map_len; i++) {
-            stackMap[i] = new StackMapData(in, this);
-        }
-    }
-
-    /**
-     * Return access of the method.
-     */
-    public String[] getAccess(){
-
-        Vector<String> v = new Vector<String>();
-        if ((access & ACC_PUBLIC)   !=0) v.addElement("public");
-        if ((access & ACC_PRIVATE)   !=0) v.addElement("private");
-        if ((access & ACC_PROTECTED)   !=0) v.addElement("protected");
-        if ((access & ACC_STATIC)   !=0) v.addElement("static");
-        if ((access & ACC_FINAL)    !=0) v.addElement("final");
-        if ((access & ACC_SYNCHRONIZED) !=0) v.addElement("synchronized");
-        if ((access & ACC_NATIVE) !=0) v.addElement("native");
-        if ((access & ACC_ABSTRACT) !=0) v.addElement("abstract");
-        if ((access & ACC_STRICT) !=0) v.addElement("strictfp");
-
-        String[] accflags = new String[v.size()];
-        v.copyInto(accflags);
-        return accflags;
-    }
-
-    /**
-     * Return name of the method.
-     */
-    public String getName(){
-        return cls.getStringValue(name_index);
-    }
-
-    /**
-     * Return internal siganature of the method.
-     */
-    public String getInternalSig(){
-        return cls.getStringValue(descriptor_index);
-    }
-
-    /**
-     * Return java return type signature of method.
-     */
-    public String getReturnType(){
-
-        String rttype = (new TypeSignature(getInternalSig())).getReturnType();
-        return rttype;
-    }
-
-    /**
-     * Return java type parameter signature.
-     */
-    public String getParameters(){
-        String ptype = (new TypeSignature(getInternalSig())).getParameters();
-
-        return ptype;
-    }
-
-    /**
-     * Return code attribute data of a method.
-     */
-    public byte[] getCode(){
-        return code;
-    }
-
-    /**
-     * Return LineNumberTable size.
-     */
-    public int getnumlines(){
-        return lin_num_tb.size();
-    }
-
-    /**
-     * Return LineNumberTable
-     */
-    public Vector<?> getlin_num_tb(){
-        return lin_num_tb;
-    }
-
-    /**
-     * Return LocalVariableTable size.
-     */
-    public int getloc_var_tbsize(){
-        return loc_var_tb.size();
-    }
-
-
-    /**
-     * Return LocalVariableTable.
-     */
-    public Vector<?> getloc_var_tb(){
-        return loc_var_tb;
-    }
-
-    /**
-     * Return StackMap.
-     */
-    public StackMapData[] getStackMap() {
-        return stackMap;
-    }
-
-    /**
-     * Return StackMapTable.
-     */
-    public StackMapTableData[] getStackMapTable() {
-        return stackMapTable;
-    }
-
-    /**
-     * Return number of arguments of that method.
-     */
-    public int getArgumentlength(){
-        return new TypeSignature(getInternalSig()).getArgumentlength();
-    }
-
-    /**
-     * Return true if method is static
-     */
-    public boolean isStatic(){
-        if ((access & ACC_STATIC)   !=0) return true;
-        return false;
-    }
-
-
-    /**
-     * Return max depth of operand stack.
-     */
-    public int getMaxStack(){
-        return  max_stack;
-    }
-
-
-    /**
-     * Return number of local variables.
-     */
-    public int getMaxLocals(){
-        return max_locals;
-    }
-
-
-    /**
-     * Return exception index table in Exception attribute.
-     */
-    public int []get_exc_index_table(){
-        return  exc_index_table;
-    }
-
-
-    /**
-     * Return exception table in code attributre.
-     */
-    public Vector<?> getexception_table(){
-        return exception_table;
-    }
-
-
-    /**
-     * Return method attributes.
-     */
-    public Vector<?> getAttributes(){
-        return attrs;
-    }
-
-
-    /**
-     * Return code attributes.
-     */
-    public Vector<?> getCodeAttributes(){
-        return code_attrs;
-    }
-
-
-    /**
-     * Return true if method id synthetic.
-     */
-    public boolean isSynthetic(){
-        return isSynthetic;
-    }
-
-
-    /**
-     * Return true if method is deprecated.
-     */
-    public boolean isDeprecated(){
-        return isDeprecated;
-    }
-}
--- a/langtools/src/share/classes/sun/tools/javap/RuntimeConstants.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,787 +0,0 @@
-/*
- * Copyright 2002-2005 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-package sun.tools.javap;
-
-public interface RuntimeConstants {
-
-    /* Signature Characters */
-    public static final char   SIGC_VOID                  = 'V';
-    public static final String SIG_VOID                   = "V";
-    public static final char   SIGC_BOOLEAN               = 'Z';
-    public static final String SIG_BOOLEAN                = "Z";
-    public static final char   SIGC_BYTE                  = 'B';
-    public static final String SIG_BYTE                   = "B";
-    public static final char   SIGC_CHAR                  = 'C';
-    public static final String SIG_CHAR                   = "C";
-    public static final char   SIGC_SHORT                 = 'S';
-    public static final String SIG_SHORT                  = "S";
-    public static final char   SIGC_INT                   = 'I';
-    public static final String SIG_INT                    = "I";
-    public static final char   SIGC_LONG                  = 'J';
-    public static final String SIG_LONG                   = "J";
-    public static final char   SIGC_FLOAT                 = 'F';
-    public static final String SIG_FLOAT                  = "F";
-    public static final char   SIGC_DOUBLE                = 'D';
-    public static final String SIG_DOUBLE                 = "D";
-    public static final char   SIGC_ARRAY                 = '[';
-    public static final String SIG_ARRAY                  = "[";
-    public static final char   SIGC_CLASS                 = 'L';
-    public static final String SIG_CLASS                  = "L";
-    public static final char   SIGC_METHOD                = '(';
-    public static final String SIG_METHOD                 = "(";
-    public static final char   SIGC_ENDCLASS              = ';';
-    public static final String SIG_ENDCLASS               = ";";
-    public static final char   SIGC_ENDMETHOD             = ')';
-    public static final String SIG_ENDMETHOD              = ")";
-    public static final char   SIGC_PACKAGE               = '/';
-    public static final String SIG_PACKAGE                = "/";
-
-    /* Class File Constants */
-    public static final int JAVA_MAGIC                   = 0xcafebabe;
-    public static final int JAVA_VERSION                 = 45;
-    public static final int JAVA_MINOR_VERSION           = 3;
-
-    /* Constant table */
-    public static final int CONSTANT_UTF8                = 1;
-    public static final int CONSTANT_UNICODE             = 2;
-    public static final int CONSTANT_INTEGER             = 3;
-    public static final int CONSTANT_FLOAT               = 4;
-    public static final int CONSTANT_LONG                = 5;
-    public static final int CONSTANT_DOUBLE              = 6;
-    public static final int CONSTANT_CLASS               = 7;
-    public static final int CONSTANT_STRING              = 8;
-    public static final int CONSTANT_FIELD               = 9;
-    public static final int CONSTANT_METHOD              = 10;
-    public static final int CONSTANT_INTERFACEMETHOD     = 11;
-    public static final int CONSTANT_NAMEANDTYPE         = 12;
-
-    /* Access Flags */
-    public static final int ACC_PUBLIC                   = 0x00000001;
-    public static final int ACC_PRIVATE                  = 0x00000002;
-    public static final int ACC_PROTECTED                = 0x00000004;
-    public static final int ACC_STATIC                   = 0x00000008;
-    public static final int ACC_FINAL                    = 0x00000010;
-    public static final int ACC_SYNCHRONIZED             = 0x00000020;
-    public static final int ACC_SUPER                        = 0x00000020;
-    public static final int ACC_VOLATILE                 = 0x00000040;
-    public static final int ACC_TRANSIENT                = 0x00000080;
-    public static final int ACC_NATIVE                   = 0x00000100;
-    public static final int ACC_INTERFACE                = 0x00000200;
-    public static final int ACC_ABSTRACT                 = 0x00000400;
-    public static final int ACC_STRICT                   = 0x00000800;
-    public static final int ACC_EXPLICIT                 = 0x00001000;
-    public static final int ACC_SYNTHETIC                = 0x00010000; // actually, this is an attribute
-
-    /* Type codes */
-    public static final int T_CLASS                      = 0x00000002;
-    public static final int T_BOOLEAN                    = 0x00000004;
-    public static final int T_CHAR                       = 0x00000005;
-    public static final int T_FLOAT                      = 0x00000006;
-    public static final int T_DOUBLE                     = 0x00000007;
-    public static final int T_BYTE                       = 0x00000008;
-    public static final int T_SHORT                      = 0x00000009;
-    public static final int T_INT                        = 0x0000000a;
-    public static final int T_LONG                       = 0x0000000b;
-
-    /* Type codes for StackMap attribute */
-    public static final int ITEM_Bogus      =0; // an unknown or uninitialized value
-    public static final int ITEM_Integer    =1; // a 32-bit integer
-    public static final int ITEM_Float      =2; // not used
-    public static final int ITEM_Double     =3; // not used
-    public static final int ITEM_Long       =4; // a 64-bit integer
-    public static final int ITEM_Null       =5; // the type of null
-    public static final int ITEM_InitObject =6; // "this" in constructor
-    public static final int ITEM_Object     =7; // followed by 2-byte index of class name
-    public static final int ITEM_NewObject  =8; // followed by 2-byte ref to "new"
-
-    /* Constants used in StackMapTable attribute */
-    public static final int SAME_FRAME_BOUND                  = 64;
-    public static final int SAME_LOCALS_1_STACK_ITEM_BOUND    = 128;
-    public static final int SAME_LOCALS_1_STACK_ITEM_EXTENDED = 247;
-    public static final int SAME_FRAME_EXTENDED               = 251;
-    public static final int FULL_FRAME                        = 255;
-
-    /* Opcodes */
-    public static final int opc_dead                     = -2;
-    public static final int opc_label                    = -1;
-    public static final int opc_nop                      = 0;
-    public static final int opc_aconst_null              = 1;
-    public static final int opc_iconst_m1                = 2;
-    public static final int opc_iconst_0                 = 3;
-    public static final int opc_iconst_1                 = 4;
-    public static final int opc_iconst_2                 = 5;
-    public static final int opc_iconst_3                 = 6;
-    public static final int opc_iconst_4                 = 7;
-    public static final int opc_iconst_5                 = 8;
-    public static final int opc_lconst_0                 = 9;
-    public static final int opc_lconst_1                 = 10;
-    public static final int opc_fconst_0                 = 11;
-    public static final int opc_fconst_1                 = 12;
-    public static final int opc_fconst_2                 = 13;
-    public static final int opc_dconst_0                 = 14;
-    public static final int opc_dconst_1                 = 15;
-    public static final int opc_bipush                   = 16;
-    public static final int opc_sipush                   = 17;
-    public static final int opc_ldc                      = 18;
-    public static final int opc_ldc_w                    = 19;
-    public static final int opc_ldc2_w                   = 20;
-    public static final int opc_iload                    = 21;
-    public static final int opc_lload                    = 22;
-    public static final int opc_fload                    = 23;
-    public static final int opc_dload                    = 24;
-    public static final int opc_aload                    = 25;
-    public static final int opc_iload_0                  = 26;
-    public static final int opc_iload_1                  = 27;
-    public static final int opc_iload_2                  = 28;
-    public static final int opc_iload_3                  = 29;
-    public static final int opc_lload_0                  = 30;
-    public static final int opc_lload_1                  = 31;
-    public static final int opc_lload_2                  = 32;
-    public static final int opc_lload_3                  = 33;
-    public static final int opc_fload_0                  = 34;
-    public static final int opc_fload_1                  = 35;
-    public static final int opc_fload_2                  = 36;
-    public static final int opc_fload_3                  = 37;
-    public static final int opc_dload_0                  = 38;
-    public static final int opc_dload_1                  = 39;
-    public static final int opc_dload_2                  = 40;
-    public static final int opc_dload_3                  = 41;
-    public static final int opc_aload_0                  = 42;
-    public static final int opc_aload_1                  = 43;
-    public static final int opc_aload_2                  = 44;
-    public static final int opc_aload_3                  = 45;
-    public static final int opc_iaload                   = 46;
-    public static final int opc_laload                   = 47;
-    public static final int opc_faload                   = 48;
-    public static final int opc_daload                   = 49;
-    public static final int opc_aaload                   = 50;
-    public static final int opc_baload                   = 51;
-    public static final int opc_caload                   = 52;
-    public static final int opc_saload                   = 53;
-    public static final int opc_istore                   = 54;
-    public static final int opc_lstore                   = 55;
-    public static final int opc_fstore                   = 56;
-    public static final int opc_dstore                   = 57;
-    public static final int opc_astore                   = 58;
-    public static final int opc_istore_0                 = 59;
-    public static final int opc_istore_1                 = 60;
-    public static final int opc_istore_2                 = 61;
-    public static final int opc_istore_3                 = 62;
-    public static final int opc_lstore_0                 = 63;
-    public static final int opc_lstore_1                 = 64;
-    public static final int opc_lstore_2                 = 65;
-    public static final int opc_lstore_3                 = 66;
-    public static final int opc_fstore_0                 = 67;
-    public static final int opc_fstore_1                 = 68;
-    public static final int opc_fstore_2                 = 69;
-    public static final int opc_fstore_3                 = 70;
-    public static final int opc_dstore_0                 = 71;
-    public static final int opc_dstore_1                 = 72;
-    public static final int opc_dstore_2                 = 73;
-    public static final int opc_dstore_3                 = 74;
-    public static final int opc_astore_0                 = 75;
-    public static final int opc_astore_1                 = 76;
-    public static final int opc_astore_2                 = 77;
-    public static final int opc_astore_3                 = 78;
-    public static final int opc_iastore                  = 79;
-    public static final int opc_lastore                  = 80;
-    public static final int opc_fastore                  = 81;
-    public static final int opc_dastore                  = 82;
-    public static final int opc_aastore                  = 83;
-    public static final int opc_bastore                  = 84;
-    public static final int opc_castore                  = 85;
-    public static final int opc_sastore                  = 86;
-    public static final int opc_pop                      = 87;
-    public static final int opc_pop2                     = 88;
-    public static final int opc_dup                      = 89;
-    public static final int opc_dup_x1                   = 90;
-    public static final int opc_dup_x2                   = 91;
-    public static final int opc_dup2                     = 92;
-    public static final int opc_dup2_x1                  = 93;
-    public static final int opc_dup2_x2                  = 94;
-    public static final int opc_swap                     = 95;
-    public static final int opc_iadd                     = 96;
-    public static final int opc_ladd                     = 97;
-    public static final int opc_fadd                     = 98;
-    public static final int opc_dadd                     = 99;
-    public static final int opc_isub                     = 100;
-    public static final int opc_lsub                     = 101;
-    public static final int opc_fsub                     = 102;
-    public static final int opc_dsub                     = 103;
-    public static final int opc_imul                     = 104;
-    public static final int opc_lmul                     = 105;
-    public static final int opc_fmul                     = 106;
-    public static final int opc_dmul                     = 107;
-    public static final int opc_idiv                     = 108;
-    public static final int opc_ldiv                     = 109;
-    public static final int opc_fdiv                     = 110;
-    public static final int opc_ddiv                     = 111;
-    public static final int opc_irem                     = 112;
-    public static final int opc_lrem                     = 113;
-    public static final int opc_frem                     = 114;
-    public static final int opc_drem                     = 115;
-    public static final int opc_ineg                     = 116;
-    public static final int opc_lneg                     = 117;
-    public static final int opc_fneg                     = 118;
-    public static final int opc_dneg                     = 119;
-    public static final int opc_ishl                     = 120;
-    public static final int opc_lshl                     = 121;
-    public static final int opc_ishr                     = 122;
-    public static final int opc_lshr                     = 123;
-    public static final int opc_iushr                    = 124;
-    public static final int opc_lushr                    = 125;
-    public static final int opc_iand                     = 126;
-    public static final int opc_land                     = 127;
-    public static final int opc_ior                      = 128;
-    public static final int opc_lor                      = 129;
-    public static final int opc_ixor                     = 130;
-    public static final int opc_lxor                     = 131;
-    public static final int opc_iinc                     = 132;
-    public static final int opc_i2l                      = 133;
-    public static final int opc_i2f                      = 134;
-    public static final int opc_i2d                      = 135;
-    public static final int opc_l2i                      = 136;
-    public static final int opc_l2f                      = 137;
-    public static final int opc_l2d                      = 138;
-    public static final int opc_f2i                      = 139;
-    public static final int opc_f2l                      = 140;
-    public static final int opc_f2d                      = 141;
-    public static final int opc_d2i                      = 142;
-    public static final int opc_d2l                      = 143;
-    public static final int opc_d2f                      = 144;
-    public static final int opc_i2b                      = 145;
-    public static final int opc_int2byte                 = 145;
-    public static final int opc_i2c                      = 146;
-    public static final int opc_int2char                 = 146;
-    public static final int opc_i2s                      = 147;
-    public static final int opc_int2short                = 147;
-    public static final int opc_lcmp                     = 148;
-    public static final int opc_fcmpl                    = 149;
-    public static final int opc_fcmpg                    = 150;
-    public static final int opc_dcmpl                    = 151;
-    public static final int opc_dcmpg                    = 152;
-    public static final int opc_ifeq                     = 153;
-    public static final int opc_ifne                     = 154;
-    public static final int opc_iflt                     = 155;
-    public static final int opc_ifge                     = 156;
-    public static final int opc_ifgt                     = 157;
-    public static final int opc_ifle                     = 158;
-    public static final int opc_if_icmpeq                = 159;
-    public static final int opc_if_icmpne                = 160;
-    public static final int opc_if_icmplt                = 161;
-    public static final int opc_if_icmpge                = 162;
-    public static final int opc_if_icmpgt                = 163;
-    public static final int opc_if_icmple                = 164;
-    public static final int opc_if_acmpeq                = 165;
-    public static final int opc_if_acmpne                = 166;
-    public static final int opc_goto                     = 167;
-    public static final int opc_jsr                      = 168;
-    public static final int opc_ret                      = 169;
-    public static final int opc_tableswitch              = 170;
-    public static final int opc_lookupswitch             = 171;
-    public static final int opc_ireturn                  = 172;
-    public static final int opc_lreturn                  = 173;
-    public static final int opc_freturn                  = 174;
-    public static final int opc_dreturn                  = 175;
-    public static final int opc_areturn                  = 176;
-    public static final int opc_return                   = 177;
-    public static final int opc_getstatic                = 178;
-    public static final int opc_putstatic                = 179;
-    public static final int opc_getfield                 = 180;
-    public static final int opc_putfield                 = 181;
-    public static final int opc_invokevirtual            = 182;
-    public static final int opc_invokenonvirtual         = 183;
-    public static final int opc_invokespecial            = 183;
-    public static final int opc_invokestatic             = 184;
-    public static final int opc_invokeinterface          = 185;
-    public static final int opc_invokedynamic            = 186;
-    public static final int opc_new                      = 187;
-    public static final int opc_newarray                 = 188;
-    public static final int opc_anewarray                = 189;
-    public static final int opc_arraylength              = 190;
-    public static final int opc_athrow                   = 191;
-    public static final int opc_checkcast                = 192;
-    public static final int opc_instanceof               = 193;
-    public static final int opc_monitorenter             = 194;
-    public static final int opc_monitorexit              = 195;
-    public static final int opc_wide                     = 196;
-    public static final int opc_multianewarray           = 197;
-    public static final int opc_ifnull                   = 198;
-    public static final int opc_ifnonnull                = 199;
-    public static final int opc_goto_w                   = 200;
-    public static final int opc_jsr_w                    = 201;
-        /* Pseudo-instructions */
-    public static final int opc_bytecode                 = 203;
-    public static final int opc_try                      = 204;
-    public static final int opc_endtry                   = 205;
-    public static final int opc_catch                    = 206;
-    public static final int opc_var                      = 207;
-    public static final int opc_endvar                   = 208;
-    public static final int opc_localsmap                = 209;
-    public static final int opc_stackmap                 = 210;
-        /* PicoJava prefixes */
-    public static final int opc_nonpriv                  = 254;
-    public static final int opc_priv                     = 255;
-
-        /* Wide instructions */
-    public static final int opc_iload_w         = (opc_wide<<8)|opc_iload;
-    public static final int opc_lload_w         = (opc_wide<<8)|opc_lload;
-    public static final int opc_fload_w         = (opc_wide<<8)|opc_fload;
-    public static final int opc_dload_w         = (opc_wide<<8)|opc_dload;
-    public static final int opc_aload_w         = (opc_wide<<8)|opc_aload;
-    public static final int opc_istore_w        = (opc_wide<<8)|opc_istore;
-    public static final int opc_lstore_w        = (opc_wide<<8)|opc_lstore;
-    public static final int opc_fstore_w        = (opc_wide<<8)|opc_fstore;
-    public static final int opc_dstore_w        = (opc_wide<<8)|opc_dstore;
-    public static final int opc_astore_w        = (opc_wide<<8)|opc_astore;
-    public static final int opc_ret_w           = (opc_wide<<8)|opc_ret;
-    public static final int opc_iinc_w          = (opc_wide<<8)|opc_iinc;
-
-    /* Opcode Names */
-  public static final String opcNamesTab[] = {
-        "nop",
-        "aconst_null",
-        "iconst_m1",
-        "iconst_0",
-        "iconst_1",
-        "iconst_2",
-        "iconst_3",
-        "iconst_4",
-        "iconst_5",
-        "lconst_0",
-        "lconst_1",
-        "fconst_0",
-        "fconst_1",
-        "fconst_2",
-        "dconst_0",
-        "dconst_1",
-        "bipush",
-        "sipush",
-        "ldc",
-        "ldc_w",
-        "ldc2_w",
-        "iload",
-        "lload",
-        "fload",
-        "dload",
-        "aload",
-        "iload_0",
-        "iload_1",
-        "iload_2",
-        "iload_3",
-        "lload_0",
-        "lload_1",
-        "lload_2",
-        "lload_3",
-        "fload_0",
-        "fload_1",
-        "fload_2",
-        "fload_3",
-        "dload_0",
-        "dload_1",
-        "dload_2",
-        "dload_3",
-        "aload_0",
-        "aload_1",
-        "aload_2",
-        "aload_3",
-        "iaload",
-        "laload",
-        "faload",
-        "daload",
-        "aaload",
-        "baload",
-        "caload",
-        "saload",
-        "istore",
-        "lstore",
-        "fstore",
-        "dstore",
-        "astore",
-        "istore_0",
-        "istore_1",
-        "istore_2",
-        "istore_3",
-        "lstore_0",
-        "lstore_1",
-        "lstore_2",
-        "lstore_3",
-        "fstore_0",
-        "fstore_1",
-        "fstore_2",
-        "fstore_3",
-        "dstore_0",
-        "dstore_1",
-        "dstore_2",
-        "dstore_3",
-        "astore_0",
-        "astore_1",
-        "astore_2",
-        "astore_3",
-        "iastore",
-        "lastore",
-        "fastore",
-        "dastore",
-        "aastore",
-        "bastore",
-        "castore",
-        "sastore",
-        "pop",
-        "pop2",
-        "dup",
-        "dup_x1",
-        "dup_x2",
-        "dup2",
-        "dup2_x1",
-        "dup2_x2",
-        "swap",
-        "iadd",
-        "ladd",
-        "fadd",
-        "dadd",
-        "isub",
-        "lsub",
-        "fsub",
-        "dsub",
-        "imul",
-        "lmul",
-        "fmul",
-        "dmul",
-        "idiv",
-        "ldiv",
-        "fdiv",
-        "ddiv",
-        "irem",
-        "lrem",
-        "frem",
-        "drem",
-        "ineg",
-        "lneg",
-        "fneg",
-        "dneg",
-        "ishl",
-        "lshl",
-        "ishr",
-        "lshr",
-        "iushr",
-        "lushr",
-        "iand",
-        "land",
-        "ior",
-        "lor",
-        "ixor",
-        "lxor",
-        "iinc",
-        "i2l",
-        "i2f",
-        "i2d",
-        "l2i",
-        "l2f",
-        "l2d",
-        "f2i",
-        "f2l",
-        "f2d",
-        "d2i",
-        "d2l",
-        "d2f",
-        "i2b",
-        "i2c",
-        "i2s",
-        "lcmp",
-        "fcmpl",
-        "fcmpg",
-        "dcmpl",
-        "dcmpg",
-        "ifeq",
-        "ifne",
-        "iflt",
-        "ifge",
-        "ifgt",
-        "ifle",
-        "if_icmpeq",
-        "if_icmpne",
-        "if_icmplt",
-        "if_icmpge",
-        "if_icmpgt",
-        "if_icmple",
-        "if_acmpeq",
-        "if_acmpne",
-        "goto",
-        "jsr",
-        "ret",
-        "tableswitch",
-        "lookupswitch",
-        "ireturn",
-        "lreturn",
-        "freturn",
-        "dreturn",
-        "areturn",
-        "return",
-        "getstatic",
-        "putstatic",
-        "getfield",
-        "putfield",
-        "invokevirtual",
-        "invokespecial", //     was "invokenonvirtual",
-        "invokestatic",
-        "invokeinterface",
-        "invokedynamic",
-        "new",
-        "newarray",
-        "anewarray",
-        "arraylength",
-        "athrow",
-        "checkcast",
-        "instanceof",
-        "monitorenter",
-        "monitorexit",
-         null, // "wide",
-        "multianewarray",
-        "ifnull",
-        "ifnonnull",
-        "goto_w",
-        "jsr_w",
-        "bytecode 202", // "breakpoint",
-        "bytecode",
-        "try",
-        "endtry",
-        "catch",
-        "var",
-        "endvar",
-        "locals_map",
-        "stack_map"
-  };
-
-    /* Opcode Lengths */
-  public static final int opcLengthsTab[] = {
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        2,
-        3,
-        2,
-        3,
-        3,
-        2,
-        2,
-        2,
-        2,
-        2,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        2,
-        2,
-        2,
-        2,
-        2,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        3,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        3,
-        3,
-        3,
-        3,
-        3,
-        3,
-        3,
-        3,
-        3,
-        3,
-        3,
-        3,
-        3,
-        3,
-        3,
-        3,
-        2,
-        99,
-        99,
-        1,
-        1,
-        1,
-        1,
-        1,
-        1,
-        3,
-        3,
-        3,
-        3,
-        3,
-        3,
-        3,
-        5,
-        0,
-        3,
-        2,
-        3,
-        1,
-        1,
-        3,
-        3,
-        1,
-        1,
-        0, // wide
-        4,
-        3,
-        3,
-        5,
-        5,
-        1,
-        1, 0, 0, 0, 0, 0 // pseudo
-  };
-
-}
--- a/langtools/src/share/classes/sun/tools/javap/StackMapData.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-package sun.tools.javap;
-
-import java.util.*;
-import java.io.*;
-
-import static sun.tools.javap.RuntimeConstants.*;
-
-/* represents one entry of StackMap attribute
- */
-class StackMapData {
-    final int offset;
-    final int[] locals;
-    final int[] stack;
-
-    StackMapData(int offset, int[] locals, int[] stack) {
-        this.offset = offset;
-        this.locals = locals;
-        this.stack = stack;
-    }
-
-    StackMapData(DataInputStream in, MethodData method) throws IOException {
-        offset = in.readUnsignedShort();
-        int local_size = in.readUnsignedShort();
-        locals = readTypeArray(in, local_size, method);
-        int stack_size = in.readUnsignedShort();
-        stack = readTypeArray(in, stack_size, method);
-    }
-
-    static final int[] readTypeArray(DataInputStream in, int length, MethodData method) throws IOException {
-        int[] types = new int[length];
-        for (int i=0; i<length; i++) {
-            types[i] = readType(in, method);
-        }
-        return types;
-    }
-
-    static final int readType(DataInputStream in, MethodData method) throws IOException {
-        int type = in.readUnsignedByte();
-        if (type == ITEM_Object || type == ITEM_NewObject) {
-            type = type | (in.readUnsignedShort()<<8);
-        }
-        return type;
-    }
-
-    void print(JavapPrinter p) {
-        p.out.println("   " + offset + ":");
-        p.printMap("    locals = [", locals);
-        p.printMap("    stack = [", stack);
-    }
-}
--- a/langtools/src/share/classes/sun/tools/javap/StackMapTableData.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-package sun.tools.javap;
-
-import java.util.*;
-import java.io.*;
-
-import static sun.tools.javap.RuntimeConstants.*;
-
-/* represents one entry of StackMapTable attribute
- */
-class StackMapTableData {
-    final int frameType;
-    int offsetDelta;
-
-    StackMapTableData(int frameType) {
-        this.frameType = frameType;
-    }
-
-    void print(JavapPrinter p) {
-        p.out.print("   frame_type = " + frameType);
-    }
-
-    static class SameFrame extends StackMapTableData {
-        SameFrame(int frameType, int offsetDelta) {
-            super(frameType);
-            this.offsetDelta = offsetDelta;
-        }
-        void print(JavapPrinter p) {
-            super.print(p);
-            if (frameType < SAME_FRAME_BOUND) {
-                p.out.println(" /* same */");
-            } else {
-                p.out.println(" /* same_frame_extended */");
-                p.out.println("     offset_delta = " + offsetDelta);
-            }
-        }
-    }
-
-    static class SameLocals1StackItem extends StackMapTableData {
-        final int[] stack;
-        SameLocals1StackItem(int frameType, int offsetDelta, int[] stack) {
-            super(frameType);
-            this.offsetDelta = offsetDelta;
-            this.stack = stack;
-        }
-        void print(JavapPrinter p) {
-            super.print(p);
-            if (frameType == SAME_LOCALS_1_STACK_ITEM_EXTENDED) {
-                p.out.println(" /* same_locals_1_stack_item_frame_extended */");
-                p.out.println("     offset_delta = " + offsetDelta);
-            } else {
-                p.out.println(" /* same_locals_1_stack_item */");
-            }
-            p.printMap("     stack = [", stack);
-        }
-    }
-
-    static class ChopFrame extends StackMapTableData {
-        ChopFrame(int frameType, int offsetDelta) {
-            super(frameType);
-            this.offsetDelta = offsetDelta;
-        }
-        void print(JavapPrinter p) {
-            super.print(p);
-            p.out.println(" /* chop */");
-            p.out.println("     offset_delta = " + offsetDelta);
-        }
-    }
-
-    static class AppendFrame extends StackMapTableData {
-        final int[] locals;
-        AppendFrame(int frameType, int offsetDelta, int[] locals) {
-            super(frameType);
-            this.offsetDelta = offsetDelta;
-            this.locals = locals;
-        }
-        void print(JavapPrinter p) {
-            super.print(p);
-            p.out.println(" /* append */");
-            p.out.println("     offset_delta = " + offsetDelta);
-            p.printMap("     locals = [", locals);
-        }
-    }
-
-    static class FullFrame extends StackMapTableData {
-        final int[] locals;
-        final int[] stack;
-        FullFrame(int offsetDelta, int[] locals, int[] stack) {
-            super(FULL_FRAME);
-            this.offsetDelta = offsetDelta;
-            this.locals = locals;
-            this.stack = stack;
-        }
-        void print(JavapPrinter p) {
-            super.print(p);
-            p.out.println(" /* full_frame */");
-            p.out.println("     offset_delta = " + offsetDelta);
-            p.printMap("     locals = [", locals);
-            p.printMap("     stack = [", stack);
-        }
-    }
-
-    static StackMapTableData getInstance(DataInputStream in, MethodData method)
-                  throws IOException {
-        int frameType = in.readUnsignedByte();
-
-        if (frameType < SAME_FRAME_BOUND) {
-            // same_frame
-            return new SameFrame(frameType, frameType);
-        } else if (SAME_FRAME_BOUND <= frameType && frameType < SAME_LOCALS_1_STACK_ITEM_BOUND) {
-            // same_locals_1_stack_item_frame
-            // read additional single stack element
-            return new SameLocals1StackItem(frameType,
-                                            (frameType - SAME_FRAME_BOUND),
-                                            StackMapData.readTypeArray(in, 1, method));
-        } else if (frameType == SAME_LOCALS_1_STACK_ITEM_EXTENDED) {
-            // same_locals_1_stack_item_extended
-            return new SameLocals1StackItem(frameType,
-                                            in.readUnsignedShort(),
-                                            StackMapData.readTypeArray(in, 1, method));
-        } else if (SAME_LOCALS_1_STACK_ITEM_EXTENDED < frameType  && frameType < SAME_FRAME_EXTENDED) {
-            // chop_frame or same_frame_extended
-            return new ChopFrame(frameType, in.readUnsignedShort());
-        } else if (frameType == SAME_FRAME_EXTENDED) {
-            // chop_frame or same_frame_extended
-            return new SameFrame(frameType, in.readUnsignedShort());
-        } else if (SAME_FRAME_EXTENDED < frameType  && frameType < FULL_FRAME) {
-            // append_frame
-            return new AppendFrame(frameType, in.readUnsignedShort(),
-                                   StackMapData.readTypeArray(in, frameType - SAME_FRAME_EXTENDED, method));
-        } else if (frameType == FULL_FRAME) {
-            // full_frame
-            int offsetDelta = in.readUnsignedShort();
-            int locals_size = in.readUnsignedShort();
-            int[] locals = StackMapData.readTypeArray(in, locals_size, method);
-            int stack_size = in.readUnsignedShort();
-            int[] stack = StackMapData.readTypeArray(in, stack_size, method);
-            return new FullFrame(offsetDelta, locals, stack);
-        } else {
-            throw new ClassFormatError("unrecognized frame_type in StackMapTable");
-        }
-    }
-}
--- a/langtools/src/share/classes/sun/tools/javap/Tables.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,375 +0,0 @@
-/*
- * Copyright 2002-2008 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-package sun.tools.javap;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-
-public class Tables implements Constants {
-    /**
-     * Define mnemocodes table.
-     */
-  static  Hashtable<String,Integer> mnemocodes = new Hashtable<String,Integer>(301, 0.5f);
-  static  String opcExtNamesTab[]=new String[128];
-  static  String opcPrivExtNamesTab[]=new String[128];
-  static  void defineNonPriv(int opc, String mnem) {
-        mnemocodes.put(opcExtNamesTab[opc]=mnem, opc_nonpriv*256+opc);
-  }
-  static  void definePriv(int opc, String mnem) {
-        mnemocodes.put(opcPrivExtNamesTab[opc]="priv_"+mnem, opc_priv*256+opc);
-  }
-  static  void defineExt(int opc, String mnem) {
-        defineNonPriv(opc, mnem);
-        definePriv(opc, mnem);
-  }
-  static { int k;
-        for (k=0; k<opc_wide; k++) {
-                mnemocodes.put(opcNamesTab[k], k);
-        }
-        for (k=opc_wide+1; k<opcNamesTab.length; k++) {
-                mnemocodes.put(opcNamesTab[k], k);
-        }
-        mnemocodes.put("invokenonvirtual", opc_invokespecial);
-
-        mnemocodes.put("iload_w", opc_iload_w);
-        mnemocodes.put("lload_w", opc_lload_w);
-        mnemocodes.put("fload_w", opc_fload_w);
-        mnemocodes.put("dload_w", opc_dload_w);
-        mnemocodes.put("aload_w", opc_aload_w);
-        mnemocodes.put("istore_w", opc_istore_w);
-        mnemocodes.put("lstore_w", opc_lstore_w);
-        mnemocodes.put("fstore_w", opc_fstore_w);
-        mnemocodes.put("dstore_w", opc_dstore_w);
-        mnemocodes.put("astore_w", opc_astore_w);
-        mnemocodes.put("ret_w", opc_ret_w);
-        mnemocodes.put("iinc_w", opc_iinc_w);
-
-        mnemocodes.put("nonpriv", opc_nonpriv);
-        mnemocodes.put("priv", opc_priv);
-
-        defineExt(0, "load_ubyte");
-        defineExt(1, "load_byte");
-        defineExt(2, "load_char");
-        defineExt(3, "load_short");
-        defineExt(4, "load_word");
-        defineExt(10, "load_char_oe");
-        defineExt(11, "load_short_oe");
-        defineExt(12, "load_word_oe");
-        defineExt(16, "ncload_ubyte");
-        defineExt(17, "ncload_byte");
-        defineExt(18, "ncload_char");
-        defineExt(19, "ncload_short");
-        defineExt(20, "ncload_word");
-        defineExt(26, "ncload_char_oe");
-        defineExt(27, "ncload_short_oe");
-        defineExt(28, "ncload_word_oe");
-        defineExt(30, "cache_flush");
-        defineExt(32, "store_byte");
-        defineExt(34, "store_short");
-        defineExt(36, "store_word");
-        defineExt(42, "store_short_oe");
-        defineExt(44, "store_word_oe");
-        defineExt(48, "ncstore_byte");
-        defineExt(50, "ncstore_short");
-        defineExt(52, "ncstore_word");
-        defineExt(58, "ncstore_short_oe");
-        defineExt(60, "ncstore_word_oe");
-        defineExt(62, "zero_line");
-        defineNonPriv(5, "ret_from_sub");
-        defineNonPriv(63, "enter_sync_method");
-        definePriv(5, "ret_from_trap");
-        definePriv(6, "read_dcache_tag");
-        definePriv(7, "read_dcache_data");
-        definePriv(14, "read_icache_tag");
-        definePriv(15, "read_icache_data");
-        definePriv(22, "powerdown");
-        definePriv(23, "read_scache_data");
-        definePriv(31, "cache_index_flush");
-        definePriv(38, "write_dcache_tag");
-        definePriv(39, "write_dcache_data");
-        definePriv(46, "write_icache_tag");
-        definePriv(47, "write_icache_data");
-        definePriv(54, "reset");
-        definePriv(55, "write_scache_data");
-        for (k=0; k<32; k++) {
-                definePriv(k+64, "read_reg_"+k);
-        }
-        for (k=0; k<32; k++) {
-                definePriv(k+96, "write_reg_"+k);
-        }
- }
-
-  public static int opcLength(int opc) throws ArrayIndexOutOfBoundsException {
-        switch (opc>>8) {
-          case 0:
-                return opcLengthsTab[opc];
-          case opc_wide:
-                switch (opc&0xFF) {
-                  case opc_aload: case opc_astore:
-                  case opc_fload: case opc_fstore:
-                  case opc_iload: case opc_istore:
-                  case opc_lload: case opc_lstore:
-                  case opc_dload: case opc_dstore:
-                  case opc_ret:
-                        return  4;
-                  case opc_iinc:
-                        return  6;
-                  default:
-                        throw new ArrayIndexOutOfBoundsException();
-                }
-          case opc_nonpriv:
-          case opc_priv:
-                return 2;
-          default:
-                throw new ArrayIndexOutOfBoundsException();
-        }
-  }
-
-  public static String opcName(int opc) {
-        try {
-                switch (opc>>8) {
-                  case 0:
-                        return opcNamesTab[opc];
-                  case opc_wide: {
-                        String mnem=opcNamesTab[opc&0xFF]+"_w";
-                        if (mnemocodes.get(mnem) == null)
-                                return null; // non-existent opcode
-                        return mnem;
-                  }
-                  case opc_nonpriv:
-                        return opcExtNamesTab[opc&0xFF];
-                  case opc_priv:
-                        return opcPrivExtNamesTab[opc&0xFF];
-                  default:
-                        return null;
-                }
-        } catch (ArrayIndexOutOfBoundsException e) {
-                switch (opc) {
-                  case opc_nonpriv:
-                        return "nonpriv";
-                  case opc_priv:
-                        return "priv";
-                  default:
-                        return null;
-                }
-        }
-  }
-
-  public static int opcode(String mnem) {
-        Integer Val=mnemocodes.get(mnem);
-        if (Val == null) return -1;
-        return Val.intValue();
-  }
-
-    /**
-     * Initialized keyword and token Hashtables
-     */
-  static Vector<String> keywordNames = new Vector<String>(40);
-  private static void defineKeywordName(String id, int token) {
-
-        if (token>=keywordNames.size()) {
-                keywordNames.setSize(token+1);
-        }
-        keywordNames.setElementAt(id, token);
-  }
-  public static String keywordName(int token) {
-        if (token==-1) return "EOF";
-        if (token>=keywordNames.size()) return null;
-        return keywordNames.elementAt(token);
-  }
-  static {
-        defineKeywordName("ident", IDENT);
-        defineKeywordName("STRINGVAL", STRINGVAL);
-        defineKeywordName("intVal", INTVAL);
-        defineKeywordName("longVal", LONGVAL);
-        defineKeywordName("floatVal", FLOATVAL);
-        defineKeywordName("doubleVal", DOUBLEVAL);
-        defineKeywordName("SEMICOLON", SEMICOLON);
-        defineKeywordName("COLON", COLON);
-        defineKeywordName("LBRACE", LBRACE);
-        defineKeywordName("RBRACE", RBRACE);
-  }
-
-  static Hashtable<String,Integer> keywords = new Hashtable<String,Integer>(40);
-  public static int keyword(String idValue) {
-        Integer val=keywords.get(idValue);
-        if (val == null) return IDENT;
-        return val.intValue();
-  }
-
-  private static void defineKeyword(String id, int token) {
-        keywords.put(id, token);
-        defineKeywordName(id, token);
-  }
-  static {
-        // Modifier keywords
-        defineKeyword("private", PRIVATE);
-        defineKeyword("public", PUBLIC);
-        defineKeyword("protected",      PROTECTED);
-        defineKeyword("static", STATIC);
-        defineKeyword("transient",      TRANSIENT);
-        defineKeyword("synchronized",   SYNCHRONIZED);
-        defineKeyword("super",  SUPER);
-        defineKeyword("native", NATIVE);
-        defineKeyword("abstract",       ABSTRACT);
-        defineKeyword("volatile", VOLATILE);
-        defineKeyword("final",  FINAL);
-        defineKeyword("interface",INTERFACE);
-        defineKeyword("synthetic",SYNTHETIC);
-        defineKeyword("strict",STRICT);
-
-        // Declaration keywords
-        defineKeyword("package",PACKAGE);
-        defineKeyword("class",CLASS);
-        defineKeyword("extends",EXTENDS);
-        defineKeyword("implements",IMPLEMENTS);
-        defineKeyword("const",  CONST);
-        defineKeyword("throws",THROWS);
-        defineKeyword("interface",INTERFACE);
-        defineKeyword("Method",METHODREF);
-        defineKeyword("Field",FIELDREF);
-        defineKeyword("stack",STACK);
-        defineKeyword("locals",LOCAL);
-
-        // used in switchtables
-        defineKeyword("default",        DEFAULT);
-
-        // used in inner class declarations
-        defineKeyword("InnerClass",     INNERCLASS);
-        defineKeyword("of",     OF);
-
-        // misc
-        defineKeyword("bits",BITS);
-        defineKeyword("Infinity",INF);
-        defineKeyword("Inf",INF);
-        defineKeyword("NaN",NAN);
-  }
-
-   /**
-     * Define tag table.
-     */
-  private static Vector<String> tagNames = new Vector<String>(10);
-  private static Hashtable<String,Integer> Tags = new Hashtable<String,Integer>(10);
-  static {
-        defineTag("Asciz",CONSTANT_UTF8);
-        defineTag("int",CONSTANT_INTEGER);
-        defineTag("float",CONSTANT_FLOAT);
-        defineTag("long",CONSTANT_LONG);
-        defineTag("double",CONSTANT_DOUBLE);
-        defineTag("class",CONSTANT_CLASS);
-        defineTag("String",CONSTANT_STRING);
-        defineTag("Field",CONSTANT_FIELD);
-        defineTag("Method",CONSTANT_METHOD);
-        defineTag("InterfaceMethod",CONSTANT_INTERFACEMETHOD);
-        defineTag("NameAndType",CONSTANT_NAMEANDTYPE);
-  }
-  private static void defineTag(String id, int val) {
-        Tags.put(id, val);
-        if (val>=tagNames.size()) {
-                tagNames.setSize(val+1);
-        }
-        tagNames.setElementAt(id, val);
-  }
-  public static String tagName(int tag) {
-        if (tag>=tagNames.size()) return null;
-        return tagNames.elementAt(tag);
-  }
-  public static int tagValue(String idValue) {
-        Integer Val=Tags.get(idValue);
-        if (Val == null) return 0;
-        return Val.intValue();
-  }
-
-   /**
-     * Define type table. These types used in "newarray" instruction only.
-     */
-  private static Vector<String> typeNames = new Vector<String>(10);
-  private static Hashtable<String,Integer> Types = new Hashtable<String,Integer>(10);
-  static {
-        defineType("int",T_INT);
-        defineType("long",T_LONG);
-        defineType("float",T_FLOAT);
-        defineType("double",T_DOUBLE);
-        defineType("class",T_CLASS);
-        defineType("boolean",T_BOOLEAN);
-        defineType("char",T_CHAR);
-        defineType("byte",T_BYTE);
-        defineType("short",T_SHORT);
-  }
-  private static void defineType(String id, int val) {
-        Types.put(id, val);
-        if (val>=typeNames.size()) {
-                typeNames.setSize(val+1);
-        }
-        typeNames.setElementAt(id, val);
-  }
-  public static int typeValue(String idValue) {
-        Integer Val=Types.get(idValue);
-        if (Val == null) return -1;
-        return Val.intValue();
-  }
-  public static String typeName(int type) {
-        if (type>=typeNames.size()) return null;
-        return typeNames.elementAt(type);
-  }
-
-   /**
-     * Define MapTypes table.
-     * These constants used in stackmap tables only.
-     */
-  private static Vector<String> mapTypeNames = new Vector<String>(10);
-  private static Hashtable<String,Integer> MapTypes = new Hashtable<String,Integer>(10);
-  static {
-        defineMapType("bogus",             ITEM_Bogus);
-        defineMapType("int",               ITEM_Integer);
-        defineMapType("float",             ITEM_Float);
-        defineMapType("double",            ITEM_Double);
-        defineMapType("long",              ITEM_Long);
-        defineMapType("null",              ITEM_Null);
-        defineMapType("this",              ITEM_InitObject);
-        defineMapType("CP",                ITEM_Object);
-        defineMapType("uninitialized",     ITEM_NewObject);
-  }
-  private static void defineMapType(String id, int val) {
-        MapTypes.put(id, val);
-        if (val>=mapTypeNames.size()) {
-                mapTypeNames.setSize(val+1);
-        }
-        mapTypeNames.setElementAt(id, val);
-  }
-  public static int mapTypeValue(String idValue) {
-        Integer Val=MapTypes.get(idValue);
-        if (Val == null) return -1;
-        return Val.intValue();
-  }
-  public static String mapTypeName(int type) {
-        if (type>=mapTypeNames.size()) return null;
-        return mapTypeNames.elementAt(type);
-  }
-
-}
--- a/langtools/src/share/classes/sun/tools/javap/TrapData.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
- * Copyright 2002 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-package sun.tools.javap;
-
-import java.util.*;
-import java.io.*;
-
-/**
- * Stores exception table data in code attribute.
- *
- * @author  Sucheta Dambalkar (Adopted code from jdis)
- */
-class TrapData {
-    short start_pc, end_pc, handler_pc, catch_cpx;
-  int num;
-
-
-    /**
-     * Read and store exception table data in code attribute.
-     */
-    public TrapData(DataInputStream in, int num) throws IOException {
-        this.num=num;
-        start_pc = in.readShort();
-        end_pc=in.readShort();
-        handler_pc=in.readShort();
-        catch_cpx=in.readShort();
-    }
-
-    /**
-     * returns recommended identifier
-     */
-    public String ident() {
-        return "t"+num;
-    }
-
-}
--- a/langtools/src/share/classes/sun/tools/javap/TypeSignature.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,295 +0,0 @@
-/*
- * Copyright 2002-2008 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-package sun.tools.javap;
-
-import java.util.*;
-import java.io.*;
-
-/**
- * Returns java type signature.
- *
- * @author  Sucheta Dambalkar
- */
-public class TypeSignature {
-
-    String parameters = null;
-    String returntype = null;
-    String fieldtype = null;
-    int argumentlength = 0;
-
-    public TypeSignature(String JVMSignature){
-
-        if(JVMSignature != null){
-            if(JVMSignature.indexOf("(") == -1){
-                //This is a field type.
-                this.fieldtype = getFieldTypeSignature(JVMSignature);
-            }else {
-                String parameterdes = null;
-                if((JVMSignature.indexOf(")")-1) > (JVMSignature.indexOf("("))){
-                    //Get parameter signature.
-                    parameterdes =
-                        JVMSignature.substring(JVMSignature.indexOf("(")+1,
-                                               JVMSignature.indexOf(")"));
-                    this.parameters = getParametersHelper(parameterdes);
-                }else this.parameters = "()";
-                //Get return type signature.
-                String returndes = JVMSignature.substring(JVMSignature.lastIndexOf(")")+1);
-                this.returntype = getReturnTypeHelper(returndes);
-            }
-        }
-    }
-
-    /**
-     * Returns java type signature of a field.
-     */
-    public String getFieldTypeSignature(String fielddes){
-        if(fielddes.startsWith("L")){
-            return(getObjectType(fielddes));
-        }else if(fielddes.startsWith("[")){
-            return(getArrayType(fielddes));
-        }else
-            return(getBaseType(fielddes));
-    }
-
-    /**
-     * Returns java type signature of a parameter.
-     */
-    public String getParametersHelper(String parameterdes){
-        Vector<String> parameters = new Vector<String>();
-        int startindex = -1;
-        int endindex = -1;
-        String param = "";
-
-        while(parameterdes != null){
-
-            if(parameterdes.startsWith("L")){
-                //parameter is a object.
-                startindex = parameterdes.indexOf("L");
-                endindex = parameterdes.indexOf(";");
-                if(startindex < parameterdes.length()) {
-                    if(endindex == parameterdes.length()-1) {
-                        //last parameter
-                        param = parameterdes.substring(startindex);
-                        parameterdes = null;
-                    }else if(endindex+1 < parameterdes.length()){
-                        //rest parameters
-                        param = parameterdes.substring(startindex, endindex+1);
-                        parameterdes = parameterdes.substring(endindex+1);
-
-                    }
-                    parameters.add(getObjectType(param));
-                }
-            }else if(parameterdes.startsWith("[")){
-                //parameter is an array.
-                String componentType = "";
-                int enddim = -1;
-                int st = 0;
-                while(true){
-                    if(st < parameterdes.length()){
-                        if(parameterdes.charAt(st) == '['){
-
-                            enddim = st;
-                            st++;
-                        }
-                        else break;
-                    }
-                    else break;
-                }
-
-                if(enddim+1 < parameterdes.length()){
-                    /* Array dimension.*/
-                    param = parameterdes.substring(0,enddim+1);
-
-                }
-
-                int stotherparam = param.lastIndexOf("[")+1;
-
-                if(stotherparam < parameterdes.length()){
-                    componentType =  parameterdes.substring(stotherparam);
-                }
-
-                if(componentType.startsWith("L")){
-                    //parameter is array of objects.
-                    startindex = parameterdes.indexOf("L");
-                    endindex = parameterdes.indexOf(";");
-
-                    if(endindex ==  parameterdes.length()-1){
-                        //last parameter
-                        param += parameterdes.substring(startindex);
-                        parameterdes = null;
-                    }else if(endindex+1 <  parameterdes.length()){
-                        //rest parameters
-                        param += parameterdes.substring(startindex, endindex+1);
-                        parameterdes = parameterdes.substring(endindex+1);
-                    }
-                }else{
-                    //parameter is array of base type.
-                    if(componentType.length() == 1){
-                        //last parameter.
-                        param += componentType;
-                        parameterdes = null;
-                    }
-                    else if (componentType.length() > 1) {
-                        //rest parameters.
-                        param += componentType.substring(0,1);
-                        parameterdes = componentType.substring(1);
-                    }
-                }
-                parameters.add(getArrayType(param));
-
-
-            }else {
-
-                //parameter is of base type.
-                if(parameterdes.length() == 1){
-                    //last parameter
-                    param = parameterdes;
-                    parameterdes = null;
-                }
-                else if (parameterdes.length() > 1) {
-                    //rest parameters.
-                    param = parameterdes.substring(0,1);
-                    parameterdes = parameterdes.substring(1);
-                }
-                parameters.add(getBaseType(param));
-            }
-        }
-
-        /* number of arguments of a method.*/
-        argumentlength =  parameters.size();
-
-        /* java type signature.*/
-        String parametersignature = "(";
-        int i;
-
-        for(i = 0; i < parameters.size(); i++){
-            parametersignature += parameters.elementAt(i);
-            if(i != parameters.size()-1){
-                parametersignature += ", ";
-            }
-        }
-        parametersignature += ")";
-        return parametersignature;
-    }
-
-    /**
-     * Returns java type signature for a return type.
-     */
-    public String getReturnTypeHelper(String returndes){
-        return getFieldTypeSignature(returndes);
-    }
-
-    /**
-     * Returns java type signature for a base type.
-     */
-    public String getBaseType(String baseType){
-        if(baseType != null){
-            if(baseType.equals("B")) return "byte";
-            else if(baseType.equals("C")) return "char";
-            else if(baseType.equals("D")) return "double";
-            else if(baseType.equals("F")) return "float";
-            else if(baseType.equals("I")) return "int";
-            else if(baseType.equals("J")) return "long";
-            else if(baseType.equals("S")) return "short";
-            else if(baseType.equals("Z")) return "boolean";
-            else if(baseType.equals("V")) return "void";
-        }
-        return null;
-    }
-
-    /**
-     * Returns java type signature for a object type.
-     */
-    public String getObjectType(String JVMobjectType) {
-        String objectType = "";
-        int startindex = JVMobjectType.indexOf("L")+1;
-        int endindex =  JVMobjectType.indexOf(";");
-        if((startindex != -1) && (endindex != -1)){
-            if((startindex < JVMobjectType.length()) && (endindex < JVMobjectType.length())){
-                objectType = JVMobjectType.substring(startindex, endindex);
-            }
-            objectType = objectType.replace('/','.');
-            return objectType;
-        }
-        return null;
-    }
-
-    /**
-     * Returns java type signature for array type.
-     */
-    public String getArrayType(String arrayType) {
-        if(arrayType != null){
-            String dimention = "";
-
-            while(arrayType.indexOf("[") != -1){
-                dimention += "[]";
-
-                int startindex = arrayType.indexOf("[")+1;
-                if(startindex <= arrayType.length()){
-                arrayType = arrayType.substring(startindex);
-                }
-            }
-
-            String componentType = "";
-            if(arrayType.startsWith("L")){
-                componentType = getObjectType(arrayType);
-            }else {
-                componentType = getBaseType(arrayType);
-            }
-            return componentType+dimention;
-        }
-        return null;
-    }
-
-    /**
-     * Returns java type signature for parameters.
-     */
-     public String getParameters(){
-        return parameters;
-    }
-
-    /**
-     * Returns java type signature for return type.
-     */
-    public String getReturnType(){
-        return returntype;
-    }
-
-    /**
-     * Returns java type signature for field type.
-     */
-    public String getFieldType(){
-        return fieldtype;
-    }
-
-    /**
-     * Return number of arguments of a method.
-     */
-    public int getArgumentlength(){
-        return argumentlength;
-    }
-}
--- a/langtools/test/com/sun/javadoc/testIndex/TestIndex.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testIndex/TestIndex.java	Thu Jun 11 21:35:12 2009 -0700
@@ -41,7 +41,7 @@
 
     //Javadoc arguments.
     private static final String[] ARGS = new String[] {
-        "-d", BUG_ID, "-source", "1.5", "-sourcepath", SRC_DIR, "pkg", SRC_DIR + FS + "NoPackage.java"
+        "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg", SRC_DIR + FS + "NoPackage.java"
     };
 
     //Input for string search tests.
--- a/langtools/test/com/sun/javadoc/testInterface/TestInterface.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testInterface/TestInterface.java	Thu Jun 11 21:35:12 2009 -0700
@@ -42,7 +42,7 @@
 
     //Javadoc arguments.
     private static final String[] ARGS = new String[] {
-        "-source", "1.5", "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg"
+        "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg"
     };
 
     //Input for string search tests.
--- a/langtools/test/com/sun/javadoc/testNavagation/TestNavagation.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testNavagation/TestNavagation.java	Thu Jun 11 21:35:12 2009 -0700
@@ -40,7 +40,7 @@
 
     //Javadoc arguments.
     private static final String[] ARGS = new String[] {
-        "-d", BUG_ID, "-sourcepath", SRC_DIR, "-source", "1.5", "pkg"
+        "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg"
     };
 
     //Input for string search tests.
--- a/langtools/test/com/sun/javadoc/testTagInheritence/TestTagInheritence.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/com/sun/javadoc/testTagInheritence/TestTagInheritence.java	Thu Jun 11 21:35:12 2009 -0700
@@ -36,7 +36,7 @@
 
     private static final String BUG_ID = "4496223-4496270-4618686-4720974-4812240-6253614-6253604";
     private static final String[] ARGS = new String[] {
-        "-source", "1.5", "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg", "firstSentence", "firstSentence2"
+        "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg", "firstSentence", "firstSentence2"
     };
 
     /**
--- a/langtools/test/tools/javac/5005368.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/5005368.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,8 +27,8 @@
  * @summary com/sun/tools/javac/comp/Check.java refers to the undefined resource
  * @author gafter
  *
- * @compile      -source 1.5 -Werror                  5005368.java
- * @compile/fail -source 1.5 -Werror -Xlint:unchecked 5005368.java
+ * @compile      -Werror                  5005368.java
+ * @compile/fail -Werror -Xlint:unchecked 5005368.java
  */
 
 package p5005368;
--- a/langtools/test/tools/javac/6304921/T6304921.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/6304921/T6304921.java	Thu Jun 11 21:35:12 2009 -0700
@@ -1,7 +1,7 @@
 /*
  * @test (important: no SCCS keywords to affect offsets in golden file.)  /nodynamiccopyright/
  * @bug 6304921
- * @compile/fail/ref=T6304921.out -XDstdout -XDcompilePolicy=bytodo -XDdiags=%b:%s/%o/%e:%_%t%m|%p%m -Xjcov -Xlint:all,-path -Werror T6304921.java
+ * @compile/fail/ref=T6304921.out -XDstdout -XDcompilePolicy=bytodo -XDrawDiagnostics -Xjcov -Xlint:all,-path -Werror T6304921.java
  */
 
 import java.util.ArrayList;
--- a/langtools/test/tools/javac/6304921/T6304921.out	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/6304921/T6304921.out	Thu Jun 11 21:35:12 2009 -0700
@@ -1,20 +1,7 @@
-T6304921.java:671/671/680: warning: [rawtypes] found raw type: java.util.ArrayList
-        List<Integer> list = new ArrayList();
-                                 ^
-  missing type parameters for generic class java.util.ArrayList<E>
-T6304921.java:667/667/682: warning: [unchecked] unchecked conversion
-        List<Integer> list = new ArrayList();
-                             ^
-  required: java.util.List<java.lang.Integer>
-  found:    java.util.ArrayList
-error: warnings found and -Werror specified
-T6304921.java:727/733/737: cannot find symbol
-        System.orr.println("abc"); // name not found
-              ^
-  symbol:   variable orr
-  location: class java.lang.System
-T6304921.java:812/816/822: operator + cannot be applied to int,boolean
-        return 123 + true; // bad binary expression
-                   ^
+T6304921.java:29:34: compiler.warn.raw.class.use: java.util.ArrayList, java.util.ArrayList<E>
+T6304921.java:29:30: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.util.ArrayList, java.util.List<java.lang.Integer>
+- compiler.err.warnings.and.werror
+T6304921.java:35:15: compiler.err.cant.resolve.location: kindname.variable, orr, , , kindname.class, java.lang.System
+T6304921.java:38:20: compiler.err.operator.cant.be.applied: +, int,boolean
 3 errors
 2 warnings
--- a/langtools/test/tools/javac/6341866/Anno.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/6341866/Anno.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
 import javax.lang.model.element.*;
 
 @SupportedAnnotationTypes("*")
-    @SupportedSourceVersion(SourceVersion.RELEASE_6)
+    @SupportedSourceVersion(SourceVersion.RELEASE_7)
 public class Anno extends AbstractProcessor {
     public boolean process(Set<? extends TypeElement> annotations,
                                     RoundEnvironment roundEnv) {
--- a/langtools/test/tools/javac/6464451/BigFinally.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/6464451/BigFinally.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug     6464451
  * @summary javac in 5.0ux can not compile try-finally block which has a lot of "return"
  * @author  Wei Tao
- * @compile -target 5 BigFinally.java
+ * @compile -source 5 -target 5 BigFinally.java
  * @clean BigFinally
  * @compile/fail BigFinally.java
  */
--- a/langtools/test/tools/javac/6464451/DeepNestedFinally.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/6464451/DeepNestedFinally.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug     6464451
  * @summary javac in 5.0ux can not compile try-finally block which has a lot of "return"
  * @author  Wei Tao
- * @compile -target 5 DeepNestedFinally.java
+ * @compile -source 5 -target 5 DeepNestedFinally.java
  * @clean DeepNestedFinally
  * @compile/fail DeepNestedFinally.java
  */
--- a/langtools/test/tools/javac/6464451/ManyExitsInTry.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/6464451/ManyExitsInTry.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug     6464451
  * @summary javac in 5.0ux can not compile try-finally block which has a lot of "return"
  * @author  Wei Tao
- * @compile -target 5 ManyExitsInTry.java
+ * @compile -source 5 -target 5 ManyExitsInTry.java
  * @clean ManyExitsInTry
  * @compile/fail ManyExitsInTry.java
  */
--- a/langtools/test/tools/javac/6491592/T6491592.out	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/6491592/T6491592.out	Thu Jun 11 21:35:12 2009 -0700
@@ -1,2 +1,2 @@
-T6491592.java:12:11: compiler.err.operator.cant.be.applied: +, java.lang.Object,<nulltype>
+T6491592.java:12:11: compiler.err.operator.cant.be.applied: +, java.lang.Object,compiler.misc.type.null
 1 error
--- a/langtools/test/tools/javac/Ambig3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/Ambig3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Missing ambiguity error when two methods are equally specific
  * @author gafter
  *
- * @compile/fail -source 1.5 Ambig3.java
+ * @compile/fail Ambig3.java
  */
 
 class Test<T,E> {
--- a/langtools/test/tools/javac/ArrayCast.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/ArrayCast.java	Thu Jun 11 21:35:12 2009 -0700
@@ -28,7 +28,7 @@
  *          compilation.  This was fixed in 1.2beta2.
  * @author turnidge
  *
- * @compile -source 1.4 ArrayCast.java
+ * @compile ArrayCast.java
  */
 
 public class ArrayCast {
--- a/langtools/test/tools/javac/BadCovar.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/BadCovar.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Compiler allows inheritance of multiple methods with unrelated return types
  * @author gafter
  *
- * @compile/fail -source 1.5 BadCovar.java
+ * @compile/fail BadCovar.java
  */
 
 package bad.covar;
--- a/langtools/test/tools/javac/ClassLit.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/ClassLit.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Use ldc instruction for class literals
  * @author gafter
  *
- * @compile -target 1.5 ClassLit.java
+ * @compile -source 1.5 -target 1.5 ClassLit.java
  * @run main ClassLit
  */
 
--- a/langtools/test/tools/javac/ClassLiterals/InitializeOuter.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/ClassLiterals/InitializeOuter.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Using a class literal causes outermost class to be initialized early
  * @author gafter
  *
- * @compile -source 1.4 -target 1.4.2 InitializeOuter.java
+ * @compile InitializeOuter.java
  * @run main InitializeOuter
  */
 
--- a/langtools/test/tools/javac/ClassLiterals/InitializeTarget.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/ClassLiterals/InitializeTarget.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary class literal causes the referenced class to be initialized
  * @author gafter
  *
- * @compile -source 1.4 -target 1.4.2 InitializeTarget.java
+ * @compile InitializeTarget.java
  * @run main InitializeTarget
  */
 
--- a/langtools/test/tools/javac/ClassToTypeParm.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/ClassToTypeParm.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Generics: assignment of Class to type parm's default should elicit error
  * @author never
  *
- * @compile/fail -source 1.5 ClassToTypeParm.java
+ * @compile/fail ClassToTypeParm.java
  */
 
 class ClassToTypeParm<T> {
--- a/langtools/test/tools/javac/Closure1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/Closure1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Initialization of up-level links, immediately after super(), occurs too late.
  * @author gafter
  *
- * @compile -source 1.4 -target 1.4 Closure1.java
+ * @compile Closure1.java
  * @run main Closure1
  */
 
--- a/langtools/test/tools/javac/Closure2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/Closure2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Initialization of up-level links, immediately after super(), occurs too late.
  * @author gafter
  *
- * @compile -source 1.4 -target 1.4 Closure2.java
+ * @compile Closure2.java
  * @run main Closure2
  */
 
--- a/langtools/test/tools/javac/Closure3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/Closure3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Initialization of up-level links, immediately after super(), occurs too late.
  * @author gafter
  *
- * @compile -source 1.4 -target 1.4 Closure3.java
+ * @compile Closure3.java
  * @run main Closure3
  */
 
--- a/langtools/test/tools/javac/Closure4.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/Closure4.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Initialization of up-level links, immediately after super(), occurs too late.
  * @author gafter
  *
- * @compile -source 1.4 -target 1.4 Closure4.java
+ * @compile Closure4.java
  * @run main Closure4
  */
 
--- a/langtools/test/tools/javac/Closure5.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/Closure5.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Incorrect order for initializers in nested class
  * @author gafter
  *
- * @compile -source 1.4 -target 1.4 Closure5.java
+ * @compile Closure5.java
  * @run main Closure5
  */
 
--- a/langtools/test/tools/javac/CompoundBox.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/CompoundBox.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary drop compound boxing operations
  * @author gafter
  *
- * @compile/fail -source 1.5 CompoundBox.java
+ * @compile/fail CompoundBox.java
  */
 
 class CompoundBox {
--- a/langtools/test/tools/javac/ConditionalArgTypes_1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/ConditionalArgTypes_1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -28,7 +28,7 @@
  * @author maddox
  *
  * @compile/fail -source 1.4 ConditionalArgTypes_1.java
- * @compile -source 1.5 ConditionalArgTypes_1.java
+ * @compile                  ConditionalArgTypes_1.java
  */
 
 // This is the problematic case -- the controlling expression is a boolean constant.
--- a/langtools/test/tools/javac/ConditionalArgTypes_2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/ConditionalArgTypes_2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -28,7 +28,7 @@
  * @author maddox
  *
  * @compile/fail -source 1.4 ConditionalArgTypes_2.java
- * @compile -source 1.5 ConditionalArgTypes_2.java
+ * @compile                  ConditionalArgTypes_2.java
  */
 
 // This case was working before -- controlling expression is not a constant.
--- a/langtools/test/tools/javac/DefiniteAssignment/DUAssert.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/DefiniteAssignment/DUAssert.java	Thu Jun 11 21:35:12 2009 -0700
@@ -22,12 +22,12 @@
  */
 
 /*
- * @test %E
+ * @test
  * @bug 4478838 4533580
  * @summary Check correct handling of DU in assert statements
  * @author Neal Gafter (gafter)
  *
- * @run compile -source 1.4 DUAssert.java
+ * @run compile DUAssert.java
  */
 
 class DUSwitch {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234a.java	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug     6722234
+ * @summary javac diagnostics need better integration with the type-system
+ * @author  mcimadamore
+ * @compile/fail/ref=T6722234a_1.out -XDrawDiagnostics -XDdiags=disambiguateTvars T6722234a.java
+ * @compile/fail/ref=T6722234a_2.out -XDrawDiagnostics -XDdiags=disambiguateTvars,where T6722234a.java
+ */
+
+class T6722234a<T extends String> {
+    <T extends Integer> void test(T t) {
+        m(t);
+    }
+    void m(T t) {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234a_1.out	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,2 @@
+T6722234a.java:35:9: compiler.err.cant.apply.symbol: kindname.method, m, compiler.misc.type.var: T, 1, compiler.misc.type.var: T, 2, kindname.class, T6722234a<compiler.misc.type.var: T, 1>, null
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234a_2.out	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,3 @@
+T6722234a.java:35:9: compiler.err.cant.apply.symbol: kindname.method, m, compiler.misc.type.var: T, 1, compiler.misc.type.var: T, 2, kindname.class, T6722234a<compiler.misc.type.var: T, 1>, null
+- compiler.misc.where.description.typevar.1: compiler.misc.type.var: T, 1,compiler.misc.type.var: T, 2,{(compiler.misc.where.typevar: compiler.misc.type.var: T, 1, java.lang.String, kindname.class, T6722234a),(compiler.misc.where.typevar: compiler.misc.type.var: T, 2, java.lang.Integer, kindname.method, <compiler.misc.type.var: T, 2>test(compiler.misc.type.var: T, 2))}
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234b.java	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug     6722234
+ * @summary javac diagnostics need better integration with the type-system
+ * @author  mcimadamore
+ * @compile/fail/ref=T6722234b_1.out -XDrawDiagnostics -XDdiags=simpleNames T6722234b.java
+ * @compile/fail/ref=T6722234b_2.out -XDrawDiagnostics -XDdiags=simpleNames,where T6722234b.java
+ */
+
+import java.util.*;
+
+class T6722234b {
+    <T> void m(List<T> l1, List<T> l2) {}
+
+    void test(List<? extends T6722234b> list) {
+        m(list, list);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234b_1.out	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,2 @@
+T6722234b.java:39:9: compiler.err.cant.apply.symbol: kindname.method, m, List<T>,List<T>, List<compiler.misc.type.captureof: 1, ? extends T6722234b>,List<compiler.misc.type.captureof: 2, ? extends T6722234b>, kindname.class, T6722234b, null
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234b_2.out	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,4 @@
+T6722234b.java:39:9: compiler.err.cant.apply.symbol: kindname.method, m, List<T>,List<T>, List<compiler.misc.captured.type: 1>,List<compiler.misc.captured.type: 2>, kindname.class, T6722234b, null
+- compiler.misc.where.description.typevar: T,{(compiler.misc.where.typevar: T, Object, kindname.method, <T>m(List<T>,List<T>))}
+- compiler.misc.where.description.captured.1: compiler.misc.captured.type: 1,compiler.misc.captured.type: 2,{(compiler.misc.where.captured.1: compiler.misc.captured.type: 1, T6722234b, compiler.misc.type.null, ? extends T6722234b),(compiler.misc.where.captured.1: compiler.misc.captured.type: 2, T6722234b, compiler.misc.type.null, ? extends T6722234b)}
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234c.java	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug     6722234
+ * @summary javac diagnostics need better integration with the type-system
+ * @author  mcimadamore
+ * @compile/fail/ref=T6722234c.out -XDrawDiagnostics -XDdiags=simpleNames T6722234c.java
+ */
+
+class T6722234c {
+    static class String {}
+    <T> void m(String s2) {}
+
+    void test() {
+        m("");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234c.out	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,2 @@
+T6722234c.java:37:9: compiler.err.cant.apply.symbol: kindname.method, m, T6722234c.String, java.lang.String, kindname.class, T6722234c, null
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234d.java	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug     6722234
+ * @summary javac diagnostics need better integration with the type-system
+ * @author  mcimadamore
+ * @compile/fail/ref=T6722234d_1.out -XDrawDiagnostics -XDdiags=where T6722234d.java
+ * @compile/fail/ref=T6722234d_2.out -XDrawDiagnostics -XDdiags=where,simpleNames T6722234d.java
+ */
+
+class T6722234d {
+    interface I1 {}
+    interface I2 {}
+    class A implements I1, I2 {}
+    class B implements I1, I2 {}
+    class Test {
+        <Z> Z m(Z z1, Z z2) { return null; }
+        void main(){
+            A a = m(new A(), new B());
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234d_1.out	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,3 @@
+T6722234d.java:41:20: compiler.err.prob.found.req: (compiler.misc.incompatible.types), compiler.misc.intersection.type: 1, T6722234d.A
+- compiler.misc.where.description.intersection: compiler.misc.intersection.type: 1,{(compiler.misc.where.intersection: compiler.misc.intersection.type: 1, java.lang.Object,T6722234d.I1,T6722234d.I2)}
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234d_2.out	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,3 @@
+T6722234d.java:41:20: compiler.err.prob.found.req: (compiler.misc.incompatible.types), compiler.misc.intersection.type: 1, T6722234d.A
+- compiler.misc.where.description.intersection: compiler.misc.intersection.type: 1,{(compiler.misc.where.intersection: compiler.misc.intersection.type: 1, Object,I1,I2)}
+1 error
--- a/langtools/test/tools/javac/EarlyAssert.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/EarlyAssert.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,9 +27,6 @@
  * @summary Verify that assertions are enabled before the class is initialized
  * and not thereafter
  * @author gafter
- *
- * @compile -source 1.4 EarlyAssert.java
- * @run main EarlyAssert
  */
 
 /*
--- a/langtools/test/tools/javac/Enum1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/Enum1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 4934060
  * @summary private enum ctor versus specialized enum constant crashes javac
  * @author gafter
- *
- * @compile -source 1.5 Enum1.java
- * @run main Enum1
  */
 
 public enum Enum1 {
--- a/langtools/test/tools/javac/ExtendArray.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/ExtendArray.java	Thu Jun 11 21:35:12 2009 -0700
@@ -3,7 +3,7 @@
  * @bug 4336282 4785453
  * @summary Verify that extending an erray class does not crash the compiler.
  *
- * @compile/fail/ref=ExtendArray.out -XDstdout -XDdiags=%b:%l:%_%m ExtendArray.java
+ * @compile/fail/ref=ExtendArray.out -XDstdout -XDrawDiagnostics ExtendArray.java
  */
 
 // Note that an error is expected, but not a crash.
--- a/langtools/test/tools/javac/ExtendArray.out	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/ExtendArray.out	Thu Jun 11 21:35:12 2009 -0700
@@ -1,6 +1,2 @@
-ExtendArray.java:11: unexpected type
-public class ExtendArray extends Object[] {}
-                                       ^
-  required: class
-  found:    java.lang.Object[]
+ExtendArray.java:11:40: compiler.err.type.found.req: java.lang.Object[], (compiler.misc.type.req.class)
 1 error
--- a/langtools/test/tools/javac/GoodCovar.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/GoodCovar.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary multiple methods inheritence
  * @author gafter
  *
- * @compile -source 1.5 GoodCovar.java
+ * @compile GoodCovar.java
  */
 
 package good.covar;
--- a/langtools/test/tools/javac/HexFloatLiterals.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/HexFloatLiterals.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 4920023
  * @summary add "hexadecimal floating-point literal" support to javac as per 4896828
  * @author gafter
- *
- * @compile -source 1.5 HexFloatLiterals.java
- * @run main HexFloatLiterals
  */
 
 public class HexFloatLiterals {
--- a/langtools/test/tools/javac/HexThree.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/HexThree.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 4920023
  * @summary Test hex floating-point literals
  * @author darcy
- *
- * @compile -source 1.5 HexThree.java
- * @run main HexThree
  */
 
 public class HexThree {
--- a/langtools/test/tools/javac/InterfaceAssert.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/InterfaceAssert.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 4399129
  * @summary Check that assertions compile properly when nested in an interface
  * @author gafter
- *
- * @compile -source 1.4 InterfaceAssert.java
- * @run main InterfaceAssert
  */
 
 /*
--- a/langtools/test/tools/javac/InvalidIntfCast.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/InvalidIntfCast.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary The compiler should detect an invalid cast between interfaces.
  * @author turnidge
  *
- * @compile -source 1.5 InvalidIntfCast.java
+ * @compile InvalidIntfCast.java
  */
 
 interface I {
--- a/langtools/test/tools/javac/NewGeneric.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/NewGeneric.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary unclear diagnostic for "new T()"
  * @author never
  *
- * @compile/fail -source 1.5 NewGeneric.java
+ * @compile/fail NewGeneric.java
  */
 
 
--- a/langtools/test/tools/javac/ObjectMethodRefFromInterface.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/ObjectMethodRefFromInterface.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,9 +27,6 @@
  * @summary Verify that access to member of java.lang.Object via qualification of
  * object of an interface type is handled successfully.
  * @author maddox
- *
- * @run compile -source 1.3 -target 1.2 -g ObjectMethodRefFromInterface.java
- * @run main/othervm ObjectMethodRefFromInterface
  */
 
 public class ObjectMethodRefFromInterface {
--- a/langtools/test/tools/javac/OverridePosition.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/OverridePosition.java	Thu Jun 11 21:35:12 2009 -0700
@@ -4,7 +4,7 @@
  * @summary "attemping to assign weaker access" message doesn't give method line number
  * @author Neal Gafter
  *
- * @compile/fail/ref=OverridePosition.out -XDstdout -XDdiags=%b:%l:%_%m OverridePosition.java
+ * @compile/fail/ref=OverridePosition.out -XDstdout -XDrawDiagnostics OverridePosition.java
  */
 
 package T4524388;
--- a/langtools/test/tools/javac/OverridePosition.out	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/OverridePosition.out	Thu Jun 11 21:35:12 2009 -0700
@@ -1,7 +1,3 @@
-OverridePosition.java:17: method() in T4524388.Testa cannot implement method() in T4524388.Interface; attempting to assign weaker access privileges; was public
-    void method() {}
-         ^
-OverridePosition.java:24: method() in T4524388.A cannot implement method() in T4524388.Interface; attempting to assign weaker access privileges; was public
-class B extends A implements Interface {
-^
+OverridePosition.java:17:10: compiler.err.override.weaker.access: (compiler.misc.cant.implement: method(), T4524388.Testa, method(), T4524388.Interface), public
+OverridePosition.java:24:1: compiler.err.override.weaker.access: (compiler.misc.cant.implement: method(), T4524388.A, method(), T4524388.Interface), public
 2 errors
--- a/langtools/test/tools/javac/PrivateLocalConstructor.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/PrivateLocalConstructor.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 4365809
  * @summary Incorrect access method for private constructor in local class.
  * @author gafter
- *
- * @compile -source 1.4 -target 1.4 PrivateLocalConstructor.java
- * @run main PrivateLocalConstructor
  */
 
 public class PrivateLocalConstructor {
--- a/langtools/test/tools/javac/RawCrash.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/RawCrash.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary compiler crash with raw instantiation of generic inner class
  * @author gafter
  *
- * @compile -source 1.5 RawCrash.java
+ * @compile RawCrash.java
  */
 
 class A<E> {
--- a/langtools/test/tools/javac/SynthName2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/SynthName2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary using of synthetic names in local class causes ClassFormatError
  * @author gafter
  *
- * @compile/fail -source 1.4 -target 1.4 SynthName2.java
+ * @compile/fail SynthName2.java
  */
 
 import java.io.PrintStream;
--- a/langtools/test/tools/javac/T4093617/T4093617.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/T4093617/T4093617.java	Thu Jun 11 21:35:12 2009 -0700
@@ -3,7 +3,7 @@
  * @bug     4093617
  * @summary Object has no superclass
  * @author  Peter von der Ah\u00e9
- * @compile/fail/ref=T4093617.out -XDstdout -XDdiags=%b:%l:%_%m T4093617.java
+ * @compile/fail/ref=T4093617.out -XDstdout -XDrawDiagnostics T4093617.java
  */
 
 package java.lang;
--- a/langtools/test/tools/javac/T4093617/T4093617.out	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/T4093617/T4093617.out	Thu Jun 11 21:35:12 2009 -0700
@@ -1,4 +1,2 @@
-T4093617.java:12: java.lang.Object has no superclass
-    Object() { super(); }
-               ^
+T4093617.java:12:16: compiler.err.no.superclass: java.lang.Object
 1 error
--- a/langtools/test/tools/javac/T5003235/T5003235c.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/T5003235/T5003235c.java	Thu Jun 11 21:35:12 2009 -0700
@@ -3,7 +3,7 @@
  * @bug     5003235
  * @summary Access to private inner classes
  * @author  Peter von der Ah\u00e9
- * @compile/fail/ref=T5003235c.out -XDstdout -XDdiags=%b:%l:%_%m T5003235c.java
+ * @compile/fail/ref=T5003235c.out -XDstdout -XDrawDiagnostics T5003235c.java
  */
 
 class T5003235c {
--- a/langtools/test/tools/javac/T5003235/T5003235c.out	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/T5003235/T5003235c.out	Thu Jun 11 21:35:12 2009 -0700
@@ -1,4 +1,2 @@
-T5003235c.java:15: T5003235c.B has private access in T5003235c
-class C extends T5003235c.B.Inner {}
-                         ^
+T5003235c.java:15:26: compiler.err.report.access: T5003235c.B, private, T5003235c
 1 error
--- a/langtools/test/tools/javac/T5090006/compiler.sh	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/T5090006/compiler.sh	Thu Jun 11 21:35:12 2009 -0700
@@ -63,7 +63,7 @@
     ;;
 esac
 
-"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -verbose -source 5 -d "${TESTCLASSES}" -cp "${TESTSRC}${FS}broken.jar" "${TESTSRC}${FS}$1"
+"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -verbose -d "${TESTCLASSES}" -cp "${TESTSRC}${FS}broken.jar" "${TESTSRC}${FS}$1"
 
 result=$?
 
--- a/langtools/test/tools/javac/T5092545.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/T5092545.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,8 +26,6 @@
  * @bug 5092545
  * @summary Assertion failed in javac (ClassWriter.java:513)
  * @author Peter von der Ah\u00e9
- * @compile -source 5 T5092545.java
- * @run main T5092545
  */
 
 interface A { void g(); }
--- a/langtools/test/tools/javac/T5105890.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/T5105890.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,8 +26,6 @@
  * @bug 5105890
  * @summary (codegen) constant folding broken for conditional operator
  * @author Peter von der Ah\u00e9
- * @compile -source 5 T5105890.java
- * @run main T5105890
  */
 
 public class T5105890 {
--- a/langtools/test/tools/javac/T6405099.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/T6405099.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,20 +25,39 @@
  * @test
  * @bug 6405099
  * @summary Compiler crashes when javac encounters /usr/jdk/packges/lib/ext with no 777 permissions
- *
- * @ignore causes NPE in Java Test
- * @run main T6405099
- * @compile -extdirs bad T6405099.java
  */
 
-import java.io.File;
+import java.io.*;
 
 public class T6405099
 {
     public static void main(String[] args) {
         File bad = new File("bad");
-        bad.mkdir();
-        bad.setReadable(false);
-        bad.setExecutable(false);
+        try {
+            bad.mkdir();
+            bad.setReadable(false);
+            bad.setExecutable(false);
+
+            test(bad);
+
+        } finally {
+            bad.setExecutable(true);
+            bad.setReadable(true);
+        }
+    }
+
+    static void test(File dir) {
+        String[] args = {
+            "-extdirs", dir.getPath(), "-d", ".",
+            new File(System.getProperty("test.src", "."), "T6405099.java").getPath()
+        };
+
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        int rc = com.sun.tools.javac.Main.compile(args, pw);
+        if (rc != 0)
+            throw new Error("compilation failed");
+
+        System.out.println(sw);
     }
 }
--- a/langtools/test/tools/javac/T6557865.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/T6557865.java	Thu Jun 11 21:35:12 2009 -0700
@@ -24,10 +24,10 @@
 /*
  * @test
  * @bug 6557865
- * @summary -target 5 should not put ACC_SYNTHETIC on package-info
+ * @summary -source 5 -target 5 should not put ACC_SYNTHETIC on package-info
  * @author Wei Tao
  * @compile T6557865.java
- * @compile -target 5 T6232928/package-info.java
+ * @compile -source 5 -target 5 T6232928/package-info.java
  * @run main T6557865
  */
 
--- a/langtools/test/tools/javac/annotations/default/A.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/default/A.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,11 +27,11 @@
  * @summary Constraints regarding annotation defaults
  * @author gafter
  *
- * @compile -source 1.5 A.java
- * @compile -source 1.5 B.java
- * @compile -source 1.5 C.java
- * @compile/fail -source 1.5 Derr.java
- * @compile/fail -source 1.5 Eerr.java
+ * @compile A.java
+ * @compile B.java
+ * @compile C.java
+ * @compile/fail Derr.java
+ * @compile/fail Eerr.java
  */
 
 public @interface A {
--- a/langtools/test/tools/javac/annotations/neg/AnnComma.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/AnnComma.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary annotation syntax allows extra ',' in parameter list.
  * @author gafter
  *
- * @compile/fail -source 1.5 AnnComma.java
+ * @compile/fail AnnComma.java
  */
 
 package annComma;
--- a/langtools/test/tools/javac/annotations/neg/ArrayLit.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/ArrayLit.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary JSR175 (4): don't allow "new" in annotations
  * @author gafter
  *
- * @compile/fail -source 1.5 ArrayLit.java
+ * @compile/fail ArrayLit.java
  */
 
 @ArrayLit(new int[] {1, 2, 3})
--- a/langtools/test/tools/javac/annotations/neg/Constant.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Constant.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary JSR175 (5): annotations must be "constants"
  * @author gafter
  *
- * @compile/fail -source 1.5 Constant.java
+ * @compile/fail Constant.java
  */
 
 package test.tools.javac.annotation.Constant;
--- a/langtools/test/tools/javac/annotations/neg/Cycle1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Cycle1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary (JSR175) compiler allows self-containing annotation types
  * @author gafter
  *
- * @compile/fail -source 1.5 Cycle1.java
+ * @compile/fail Cycle1.java
  */
 
 package cycle1;
--- a/langtools/test/tools/javac/annotations/neg/Cycle2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Cycle2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary (JSR175) compiler allows self-containing annotation types
  * @author gafter
  *
- * @compile/fail -source 1.5 Cycle2.java
+ * @compile/fail Cycle2.java
  */
 
 package cycle2;
--- a/langtools/test/tools/javac/annotations/neg/Cycle3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Cycle3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary javac allows cyclic annotation interfaces with arrays
  * @author gafter
  *
- * @compile/fail -source 1.5 Cycle3.java
+ * @compile/fail Cycle3.java
  */
 
 package cycle3;
--- a/langtools/test/tools/javac/annotations/neg/Dep.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Dep.java	Thu Jun 11 21:35:12 2009 -0700
@@ -28,8 +28,8 @@
  * @author gafter
  *
  * @compile      -source 1.4 -Xlint:dep-ann -Werror Dep.java
- * @compile/fail -source 1.5 -Xlint:dep-ann -Werror Dep.java
- * @compile      -source 1.5 -Xlint:dep-ann         Dep.java
+ * @compile/fail             -Xlint:dep-ann -Werror Dep.java
+ * @compile                  -Xlint:dep-ann         Dep.java
  */
 
 /** @deprecated */
--- a/langtools/test/tools/javac/annotations/neg/Dup.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Dup.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary JSR175 (3): don't allow repeated annotations
  * @author gafter
  *
- * @compile/fail -source 1.5 Dup.java
+ * @compile/fail Dup.java
  */
 
 @Dup
--- a/langtools/test/tools/javac/annotations/neg/DupTarget.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/DupTarget.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary <at>Target
  * @author gafter
  *
- * @compile/fail -source 1.5 DupTarget.java
+ * @compile/fail DupTarget.java
  */
 
 @java.lang.annotation.Target({TYPE, FIELD, PACKAGE, FIELD})
--- a/langtools/test/tools/javac/annotations/neg/MemberOver.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/MemberOver.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Annotation members must not have same signature as Object or Annotation members
  * @author gafter
  *
- * @compile/fail -source 1.5 MemberOver.java
+ * @compile/fail MemberOver.java
  */
 
 package memberOver;
--- a/langtools/test/tools/javac/annotations/neg/ObjectMembers.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/ObjectMembers.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary JSR175 (2): don't allow annotating members from Object
  * @author gafter
  *
- * @compile/fail -source 1.5 ObjectMembers.java
+ * @compile/fail ObjectMembers.java
  */
 
 @ObjectMembers(hashCode = 23)
--- a/langtools/test/tools/javac/annotations/neg/OverrideNo.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/OverrideNo.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary JSR175 (7): implement <at>Overrides
  * @author gafter
  *
- * @compile/fail -source 1.5 OverrideNo.java
+ * @compile/fail OverrideNo.java
  */
 
 package overrideNo;
--- a/langtools/test/tools/javac/annotations/neg/Package.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Package.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Package annotations
  * @author gafter
  *
- * @compile/fail -source 1.5 Package.java
+ * @compile/fail Package.java
  */
 
 @java.lang.annotation.Documented
--- a/langtools/test/tools/javac/annotations/neg/Recovery.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Recovery.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary compiler crash with malformed annotations
  * @author gafter
  *
- * @compile/fail -source 1.5 Recovery.java
+ * @compile/fail Recovery.java
  */
 
 import java.lang.annotation.*;
--- a/langtools/test/tools/javac/annotations/neg/Recovery1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Recovery1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Assertion error is thrown when an annotation class cannot be found.
  * @author gafter
  *
- * @compile/fail -source 1.5 Recovery1.java
+ * @compile/fail Recovery1.java
  */
 
 package recovery1;
--- a/langtools/test/tools/javac/annotations/neg/Scope.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Scope.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary name lookup scope for annotations
  * @author gafter
  *
- * @compile/fail -source 1.5 Scope.java
+ * @compile/fail Scope.java
  */
 
 package annotation.scope;
--- a/langtools/test/tools/javac/annotations/neg/Syntax1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Syntax1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary compiler crash with ill-formed annotation
  * @author gafter
  *
- * @compile/fail -source 1.5 Syntax1.java
+ * @compile/fail Syntax1.java
  */
 
 package syntax1;
--- a/langtools/test/tools/javac/annotations/neg/WrongTarget.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/WrongTarget.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary java.lang.annotation.Target
  * @author gafter
  *
- * @compile/fail -source 1.5 WrongTarget.java
+ * @compile/fail WrongTarget.java
  */
 
 @java.lang.annotation.Target({FIELD})
--- a/langtools/test/tools/javac/annotations/neg/WrongTarget2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/WrongTarget2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Compiler allows Inherited meta-attribute on local variable declaration.
  * @author gafter
  *
- * @compile/fail -source 1.5 WrongTarget2.java
+ * @compile/fail WrongTarget2.java
  */
 
 import java.lang.annotation.Inherited;
--- a/langtools/test/tools/javac/annotations/neg/WrongValue.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/WrongValue.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary compiler: crashes when attributes with same elements are used in place of other
  * @author gafter
  *
- * @compile/fail -source 1.5 WrongValue.java
+ * @compile/fail WrongValue.java
  */
 
 @interface TestM2 {
--- a/langtools/test/tools/javac/annotations/neg/Z1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Z1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail -source 1.5 Z1.java
+ * @compile/fail Z1.java
  */
 
 enum Color { red, green, blue }
--- a/langtools/test/tools/javac/annotations/neg/Z10.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Z10.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail -source 1.5 Z10.java
+ * @compile/fail Z10.java
  */
 
 enum Color { red, green, blue }
--- a/langtools/test/tools/javac/annotations/neg/Z11.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Z11.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail -source 1.5 Z11.java
+ * @compile/fail Z11.java
  */
 
 enum Color { red, green, blue }
--- a/langtools/test/tools/javac/annotations/neg/Z12.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Z12.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail -source 1.5 Z12.java
+ * @compile/fail Z12.java
  */
 
 enum Color { red, green, blue }
--- a/langtools/test/tools/javac/annotations/neg/Z13.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Z13.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail -source 1.5 Z13.java
+ * @compile/fail Z13.java
  */
 
 @interface An {
--- a/langtools/test/tools/javac/annotations/neg/Z14.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Z14.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail -source 1.5 Z14.java
+ * @compile/fail Z14.java
  */
 
 @interface An<T> {
--- a/langtools/test/tools/javac/annotations/neg/Z15.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Z15.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail -source 1.5 Z15.java
+ * @compile/fail Z15.java
  */
 
 @interface An {
--- a/langtools/test/tools/javac/annotations/neg/Z16.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Z16.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail -source 1.5 Z16.java
+ * @compile/fail Z16.java
  */
 
 enum Color { red, green, blue }
--- a/langtools/test/tools/javac/annotations/neg/Z2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Z2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail -source 1.5 Z2.java
+ * @compile/fail Z2.java
  */
 
 enum Color { red, green, blue }
--- a/langtools/test/tools/javac/annotations/neg/Z3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Z3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail -source 1.5 Z3.java
+ * @compile/fail Z3.java
  */
 
 enum Color { red, green, blue }
--- a/langtools/test/tools/javac/annotations/neg/Z4.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Z4.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail -source 1.5 Z4.java
+ * @compile/fail Z4.java
  */
 
 enum Color { red, green, blue }
--- a/langtools/test/tools/javac/annotations/neg/Z5.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Z5.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail -source 1.5 Z5.java
+ * @compile/fail Z5.java
  */
 
 interface Foo {}
--- a/langtools/test/tools/javac/annotations/neg/Z8.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Z8.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail -source 1.5 Z8.java
+ * @compile/fail Z8.java
  */
 
 @interface An {
--- a/langtools/test/tools/javac/annotations/neg/Z9.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/neg/Z9.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail -source 1.5 Z9.java
+ * @compile/fail Z9.java
  */
 
 @interface An {
--- a/langtools/test/tools/javac/annotations/pos/AnnoteElideBraces.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/pos/AnnoteElideBraces.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary JSR175 (15): single element array annotation value
  * @author gafter
  *
- * @compile -source 1.5 AnnoteElideBraces.java
+ * @compile AnnoteElideBraces.java
  */
 
 @interface D {
--- a/langtools/test/tools/javac/annotations/pos/ClassA.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/pos/ClassA.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,8 +27,8 @@
  * @summary javac crash loading class files containing Class-valued annotation fields
  * @author gafter
  *
- * @compile -source 1.5 ClassA.java ClassB.java
- * @compile -source 1.5 ClassB.java
+ * @compile ClassA.java ClassB.java
+ * @compile ClassB.java
  */
 
 @interface ClassA {
--- a/langtools/test/tools/javac/annotations/pos/Dep.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/pos/Dep.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Please add annotation <at>Deprecated to supplant the javadoc tag
  * @author gafter
  *
- * @compile -source 1.5 -Xlint:dep-ann -Werror Dep.java
+ * @compile -Xlint:dep-ann -Werror Dep.java
  */
 
 /** @deprecated */
--- a/langtools/test/tools/javac/annotations/pos/Enum1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/pos/Enum1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary JSR175: annotations on enum constant
  * @author gafter
  *
- * @compile -source 1.5 Enum1.java
+ * @compile Enum1.java
  */
 
 package annotation.enums;
--- a/langtools/test/tools/javac/annotations/pos/Local.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/pos/Local.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary local variable annotations
  * @author gafter
  *
- * @compile -source 1.5 Local.java
+ * @compile Local.java
  */
 
 class Local {
--- a/langtools/test/tools/javac/annotations/pos/Members.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/pos/Members.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary annotation types may contain constants, types
  * @author gafter
  *
- * @compile -source 1.5 Members.java
+ * @compile Members.java
  */
 
 package members;
--- a/langtools/test/tools/javac/annotations/pos/NType.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/pos/NType.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary compiler crash if annotation using an enum type defined inside the annotation
  * @author gafter
  *
- * @compile -source 1.5 NType.java
+ * @compile NType.java
  */
 
 package ntype;
--- a/langtools/test/tools/javac/annotations/pos/OverrideCheck.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/pos/OverrideCheck.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary crash in annotation class file reader
  * @author gafter
  *
- * @compile -source 1.5 OverrideCheck.java
+ * @compile OverrideCheck.java
  */
 
 class OverrideCheck {
--- a/langtools/test/tools/javac/annotations/pos/OverrideOK.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/pos/OverrideOK.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary JSR175 (7): implement <at>Overrides
  * @author gafter
  *
- * @compile -source 1.5 OverrideOK.java
+ * @compile OverrideOK.java
  */
 
 package overrideOK;
--- a/langtools/test/tools/javac/annotations/pos/Parameter.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/pos/Parameter.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary JSR175: Parameter annotations
  * @author gafter
  *
- * @compile -source 1.5 Parameter.java
+ * @compile Parameter.java
  */
 
 package annotation.parameter;
--- a/langtools/test/tools/javac/annotations/pos/Primitives.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/pos/Primitives.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 5034991 5040842 5040853
  * @summary Modify class-file representation of Class-valued annotation elements
  * @author gafter
- *
- * @compile -source 1.5 Primitives.java
- * @run main Primitives
  */
 
 public class Primitives {
--- a/langtools/test/tools/javac/annotations/pos/RightTarget.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/pos/RightTarget.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary java.lang.annotation.Target
  * @author gafter
  *
- * @compile -source 1.5 RightTarget.java
+ * @compile RightTarget.java
  */
 
 import java.lang.annotation.ElementType;
--- a/langtools/test/tools/javac/annotations/pos/Z1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/pos/Z1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile -source 1.5 Z1.java
+ * @compile Z1.java
  */
 
 enum Color { red, green, blue }
--- a/langtools/test/tools/javac/annotations/pos/Z2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/pos/Z2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile -source 1.5 Z2.java
+ * @compile Z2.java
  */
 
 enum Color { red, green, blue }
--- a/langtools/test/tools/javac/annotations/pos/Z3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/pos/Z3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile -source 1.5 Z3.java
+ * @compile Z3.java
  */
 
 enum Color { red, green, blue }
--- a/langtools/test/tools/javac/annotations/pos/Z4.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/pos/Z4.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile -source 1.5 Z4.java
+ * @compile Z4.java
  */
 
 @interface An {
--- a/langtools/test/tools/javac/annotations/pos/package-info.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/annotations/pos/package-info.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Package annotations
  * @author gafter
  *
- * @compile -source 1.5 package-info.java
+ * @compile package-info.java
  */
 
 @java.lang.annotation.Documented
--- a/langtools/test/tools/javac/api/6431257/T6431257.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/api/6431257/T6431257.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,6 @@
  * @summary JSR 199: Changes to JavaFileManager to support JSR 269 Filer API
  * @author  Peter von der Ah\u00e9
  * @library ../lib
- * @ignore  Need to fix this test when 6508981 is fixed.
  * @compile T6431257.java package-info.java
  * @run main T6431257 foo.bar.baz foo/bar/baz
  */
--- a/langtools/test/tools/javac/api/TestJavacTaskScanner.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/api/TestJavacTaskScanner.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug     4813736
  * @summary Additional functionality test of task and JSR 269
  * @author  Peter von der Ah\u00e9
- * @ignore "misuse" of context breaks with 6358786
+ * @library ./lib
  * @run main TestJavacTaskScanner TestJavacTaskScanner.java
  */
 
@@ -42,16 +42,23 @@
 import javax.lang.model.util.Elements;
 import javax.lang.model.util.Types;
 import javax.tools.*;
-import javax.tools.JavaFileManager;
 
-public class TestJavacTaskScanner implements Runnable {
+public class TestJavacTaskScanner extends ToolTester {
 
     final JavacTaskImpl task;
     final Elements elements;
     final Types types;
 
-    TestJavacTaskScanner(JavacTaskImpl task) {
-        this.task = task;
+    int numTokens;
+    int numParseTypeElements;
+    int numAllMembers;
+
+    TestJavacTaskScanner(File file) {
+        final Iterable<? extends JavaFileObject> compilationUnits =
+            fm.getJavaFileObjects(new File[] {file});
+        task = (JavacTaskImpl)tool.getTask(null, fm, null, null, null, compilationUnits);
+        task.getContext().put(Scanner.Factory.scannerFactoryKey,
+                new MyScanner.Factory(task.getContext(), this));
         elements = task.getElements();
         types = task.getTypes();
     }
@@ -71,6 +78,23 @@
             System.out.println();
             System.out.println();
         }
+
+        System.out.println("#tokens: " + numTokens);
+        System.out.println("#parseTypeElements: " + numParseTypeElements);
+        System.out.println("#allMembers: " + numAllMembers);
+
+        check(numTokens, "#Tokens", 891);
+        check(numParseTypeElements, "#parseTypeElements", 136);
+        check(numAllMembers, "#allMembers", 67);
+    }
+
+    void check(int value, String name, int expected) {
+        // allow some slop in the comparison to allow for minor edits in the
+        // test and in the platform
+        if (value < expected * 9 / 10)
+            throw new Error(name + " lower than expected; expected " + expected + "; found: " + value);
+        if (value > expected * 11 / 10)
+            throw new Error(name + " higher than expected; expected " + expected + "; found: " + value);
     }
 
     void testParseType(TypeElement clazz) {
@@ -78,23 +102,19 @@
         for (Element member : elements.getAllMembers((TypeElement)type.asElement())) {
             TypeMirror mt = types.asMemberOf(type, member);
             System.out.format("%s : %s -> %s%n", member.getSimpleName(), member.asType(), mt);
+            numParseTypeElements++;
         }
     }
 
     public static void main(String... args) throws IOException {
-        JavaCompilerTool tool = ToolProvider.defaultJavaCompiler();
-        JavaFileManager fm = tool.getStandardFileManager();
         String srcdir = System.getProperty("test.src");
-        File file = new File(srcdir, args[0]);
-        JavacTaskImpl task = (JavacTaskImpl)tool.run(null, fm.getFileForInput(file.toString()));
-        MyScanner.Factory.preRegister(task.getContext());
-        TestJavacTaskScanner tester = new TestJavacTaskScanner(task);
-        tester.run();
+        new TestJavacTaskScanner(new File(srcdir, args[0])).run();
     }
 
     private void testGetAllMembers(TypeElement clazz) {
         for (Element member : elements.getAllMembers(clazz)) {
-            System.out.format("%s : %s", member.getSimpleName(), member.asType());
+            System.out.format("%s : %s%n", member.getSimpleName(), member.asType());
+            numAllMembers++;
         }
     }
 }
@@ -102,21 +122,15 @@
 class MyScanner extends Scanner {
 
     public static class Factory extends Scanner.Factory {
-        public static void preRegister(final Context context) {
-            context.put(scannerFactoryKey, new Context.Factory<Scanner.Factory>() {
-                public Factory make() {
-                    return new Factory(context);
-                }
-            });
-        }
-        public Factory(Context context) {
+        public Factory(Context context, TestJavacTaskScanner test) {
             super(context);
+            this.test = test;
         }
 
         @Override
         public Scanner newScanner(CharSequence input) {
             if (input instanceof CharBuffer) {
-                return new MyScanner(this, (CharBuffer)input);
+                return new MyScanner(this, (CharBuffer)input, test);
             } else {
                 char[] array = input.toString().toCharArray();
                 return newScanner(array, array.length);
@@ -125,18 +139,26 @@
 
         @Override
         public Scanner newScanner(char[] input, int inputLength) {
-            return new MyScanner(this, input, inputLength);
+            return new MyScanner(this, input, inputLength, test);
         }
+
+        private TestJavacTaskScanner test;
     }
-    protected MyScanner(Factory fac, CharBuffer buffer) {
+    protected MyScanner(Factory fac, CharBuffer buffer, TestJavacTaskScanner test) {
         super(fac, buffer);
+        this.test = test;
     }
-    protected MyScanner(Factory fac, char[] input, int inputLength) {
+    protected MyScanner(Factory fac, char[] input, int inputLength, TestJavacTaskScanner test) {
         super(fac, input, inputLength);
+        this.test = test;
     }
 
     public void nextToken() {
         super.nextToken();
         System.err.format("Saw token %s (%s)%n", token(), name());
+        test.numTokens++;
     }
+
+    private TestJavacTaskScanner test;
+
 }
--- a/langtools/test/tools/javac/assert/Attach.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/assert/Attach.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 4478095
  * @summary assertion flag attached to wrong class
  * @author gafter
- *
- * @compile -source 1.4 Attach.java
- * @run main Attach
  */
 
 public class Attach {
--- a/langtools/test/tools/javac/assert/DU1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/assert/DU1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Check correct DU computation for assertions.
  * @author gafter
  *
- * @compile/fail -source 1.4 DU1.java
+ * @compile/fail DU1.java
  */
 
 class DU1 {
--- a/langtools/test/tools/javac/assert/DU2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/assert/DU2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Check correct DU computation for assertions.
  * @author gafter
  *
- * @compile/fail -source 1.4 DU2.java
+ * @compile/fail DU2.java
  */
 
 class DU2 {
--- a/langtools/test/tools/javac/assert/Position.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/assert/Position.java	Thu Jun 11 21:35:12 2009 -0700
@@ -3,17 +3,17 @@
  * @bug 4469737
  * @summary Verify the source position for assertions.
  * @author gafter
- *
- * @compile -source 1.4 Position.java
- * @run main Position
  */
 
+
 public class Position {
     static public void main(String[] args) {
         Position.class.getClassLoader().setClassAssertionStatus("U", true);
         new U().main();
     }
 }
+
+
 class U {
     void main() {
         try {
--- a/langtools/test/tools/javac/boxing/BoxedForeach.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/boxing/BoxedForeach.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary boxing/unboxing versus foreach crashes javac
  * @author gafter
  *
- * @compile -source 1.5 BoxedForeach.java
+ * @compile BoxedForeach.java
  * @run main BoxedForeach
  */
 
--- a/langtools/test/tools/javac/boxing/Boxing1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/boxing/Boxing1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 4869233 4872709 4868735 4921949 4921209 4965701 4934916 4975565 4974939
  * @summary Boxing/unboxing positive unit and regression tests
  * @author gafter
- *
- * @compile -source 1.5 Boxing1.java
- * @run main Boxing1
  */
 
 public class Boxing1 {
--- a/langtools/test/tools/javac/boxing/Boxing2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/boxing/Boxing2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Boxing/unboxing negative unit and regression tests
  * @author gafter
  *
- * @compile/fail -source 1.5 Boxing2.java
+ * @compile/fail Boxing2.java
  */
 
 public class Boxing2 {
--- a/langtools/test/tools/javac/boxing/Boxing4.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/boxing/Boxing4.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 4999689
  * @summary Compiler incorrectly create Integer in "Character c = 95"
  * @author gafter
- *
- * @compile -source 1.5 Boxing4.java
- * @run main Boxing4
  */
 
 public class Boxing4 {
--- a/langtools/test/tools/javac/boxing/BoxingCaching.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/boxing/BoxingCaching.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 4990346
  * @summary Verify autoboxed values are cached as required.
  * @author Joseph D. Darcy
- *
- * @compile -source 1.5 BoxingCaching.java
- * @run main BoxingCaching
  */
 
 public class BoxingCaching {
--- a/langtools/test/tools/javac/capture/Capture1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/capture/Capture1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary wildcard capture (snapshotting)
  * @author gafter
  *
- * @compile -Xlint:unchecked -Werror -source 1.5 Capture1.java
+ * @compile -Xlint:unchecked -Werror Capture1.java
  */
 
 package capture1;
--- a/langtools/test/tools/javac/capture/Capture2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/capture/Capture2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary soundness problem with failure to subsitute wildcard as type formal argument
  * @author gafter
  *
- * @compile/fail -source 1.5 Capture2.java
+ * @compile/fail Capture2.java
  */
 
 package capture2;
--- a/langtools/test/tools/javac/capture/Capture3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/capture/Capture3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary new wildcard subst scheme breaks java.lang.ref
  * @author gafter
  *
- * @compile -source 1.5 Capture3.java
+ * @compile Capture3.java
  */
 
 package capture3;
--- a/langtools/test/tools/javac/capture/Capture5.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/capture/Capture5.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary wildcards versus recursive F-bounds
  * @author Peter von der Ahe
  *
- * @compile -source 1.5 Capture5.java
+ * @compile Capture5.java
  */
 
 package capture5;
--- a/langtools/test/tools/javac/cast/BoxedArray.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/cast/BoxedArray.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary REGRESSION: compiler allows cast from Integer[] to int[]
  * @author gafter
  *
- * @compile/fail -source 1.5 BoxedArray.java
+ * @compile/fail BoxedArray.java
  */
 
 public class BoxedArray {
--- a/langtools/test/tools/javac/code/ArrayClone.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/code/ArrayClone.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,15 +25,38 @@
  * @test
  * @bug 4329886
  * @summary Clone() on arrays compiled incorrectly
- * @author gafter
- *
- * @ignore Waiting for javap bug 4650860 to be fixed.
- *
- * @run shell ArrayClone.sh
+ * @author gafter jjg
  */
 
+import java.io.*;
+
 /** The qualifying type in the code for array.clone() should be the array type. */
-class ArrayClone {
+public class ArrayClone {
+    public static void main(String[] args) {
+        new ArrayClone().run();
+    }
+
+    public void run() {
+        String[] args = { "-classpath", System.getProperty("test.classes", "."), "-v", "Test" };
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        int rc = com.sun.tools.javap.Main.run(args, pw);
+        if (rc != 0)
+            throw new Error("javap failed; exit " + rc);
+
+        String out = sw.toString();
+        System.out.println(out);
+
+        for (String line: out.split("\n")) {
+            String match = "[ \t]+[0-9]+:[ \t]+invokevirtual[ \t]+#[0-9]+; //Method \"\\[Ljava/lang/String;\".clone:\\(\\)Ljava/lang/Object;";
+            if (line.matches(match))
+                return;
+        }
+        throw new Error("expected string not found in javap output");
+    }
+}
+
+class Test {
     public static void main(String[] args) {
         args.clone();
     }
--- a/langtools/test/tools/javac/code/ArrayClone.sh	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright 2002 Sun Microsystems, Inc.  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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-
-
-if [ "${TESTSRC}" = "" ]
-then
-  echo "TESTSRC not set.  Test cannot execute.  Failed."
-  exit 1
-fi
-echo "TESTSRC=${TESTSRC}"
-if [ "${TESTJAVA}" = "" ]
-then
-  echo "TESTJAVA not set.  Test cannot execute.  Failed."
-  exit 1
-fi
-echo "TESTJAVA=${TESTJAVA}"
-if [ "${TESTCLASSES}" = "" ]
-then
-  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
-  exit 1
-fi
-echo "TESTCLASSES=${TESTCLASSES}"
-echo "CLASSPATH=${CLASSPATH}"
-
-# set platform-dependent variables
-OS=`uname -s`
-case "$OS" in
-  SunOS | Linux )
-    NULL=/dev/null
-    PS=":"
-    FS="/"
-    ;;
-  Windows_95 | Windows_98 | Windows_NT )
-    NULL=NUL
-    PS=";"
-    FS="\\"
-    ;;
-  * )
-    echo "Unrecognized system!"
-    exit 1;
-    ;;
-esac
-
-TMP1=OUTPUT.txt
-
-cp "${TESTSRC}${FS}ArrayClone.java" .
-"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -target 1.5 ArrayClone.java
-result=$?
-if [ $result -ne 0 ]
-then
-    exit $result
-fi
-
-"${TESTJAVA}${FS}bin${FS}javap" ${TESTTOOLVMOPTS} -c ArrayClone > ${TMP1}
-grep WHAT_SHOULD_WE_LOOK_FOR ${TMP1}
-result=$?
-
-if [ $result -eq 0 ]
-then
-  echo "Passed"
-else
-  echo "Failed"
-fi
-exit $result
--- a/langtools/test/tools/javac/enum/AbstractEmptyEnum.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/AbstractEmptyEnum.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary empty enum cannot be abstract
  * @author Joseph D. Darcy
  *
- * @compile/fail -source 1.5 AbstractEmptyEnum.java
+ * @compile/fail AbstractEmptyEnum.java
  */
 
 public enum AbstractEmptyEnum {
--- a/langtools/test/tools/javac/enum/AbstractEnum1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/AbstractEnum1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 5054976
  * @summary compiler fails to flag an enum abstract
  * @author gafter
- *
- * @compile -source 1.5 AbstractEnum1.java
- * @run main AbstractEnum1
  */
 
 import java.lang.reflect.Modifier;
--- a/langtools/test/tools/javac/enum/DA1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/DA1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary One can refer static, const static variables from instance initializers of enum
  * @author gafter
  *
- * @compile/fail -source 1.5 DA1.java
+ * @compile/fail DA1.java
  */
 
 package da1;
--- a/langtools/test/tools/javac/enum/DA2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/DA2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary One can refer static, const static variables from instance initializers of enum
  * @author gafter
  *
- * @compile/fail -source 1.5 DA2.java
+ * @compile/fail DA2.java
  */
 
 package da2;
--- a/langtools/test/tools/javac/enum/DA3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/DA3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary One can refer static, const static variables from instance initializers of enum
  * @author gafter
  *
- * @compile/fail -source 1.5 DA3.java
+ * @compile/fail DA3.java
  */
 
 package da3;
--- a/langtools/test/tools/javac/enum/Def.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/Def.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary constant static fields cannot be referenced from const, instance initializers
  * @author gafter
  *
- * @compile -source 1.5 Def.java
+ * @compile Def.java
  */
 
 package _enum.def;
--- a/langtools/test/tools/javac/enum/Enum1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/Enum1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 4945532
  * @summary enums: test output of values().toString()
  * @author gafter
- *
- * @compile -source 1.5 Enum1.java
- * @run main Enum1
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/enum/Enum2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/Enum2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @summary enums: an enumeration type may not be extended
  * @author gafter
  *
- * @compile/fail -source 1.5 Enum2.java
+ * @compile/fail Enum2.java
  */
 
 public class Enum2 {
--- a/langtools/test/tools/javac/enum/Enum3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/Enum3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 4945532
  * @summary enums: test switch
  * @author gafter
- *
- * @compile -source 1.5 Enum3.java
- * @run main Enum3
  */
 
 public enum Enum3 {
--- a/langtools/test/tools/javac/enum/EnumImplicitPrivateConstructor.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/EnumImplicitPrivateConstructor.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 5009601 5010455 5005748
  * @summary enum constructors can be declared private
  * @author Joseph D. Darcy
- *
- * @compile -source 1.5 EnumImplicitPrivateConstructor.java
- * @run main EnumImplicitPrivateConstructor
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/enum/EnumInit.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/EnumInit.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary compiling annatations with nested enums issuing *.java leads to crash
  * @author gafter
  *
- * @compile -source 1.5 EnumInit.java
+ * @compile EnumInit.java
  */
 
 package enum_init_;
--- a/langtools/test/tools/javac/enum/EnumPrivateConstructor.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/EnumPrivateConstructor.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary enum constructors can be declared private
  * @author Joseph D. Darcy
  *
- * @compile -source 1.5 EnumPrivateConstructor.java
+ * @compile EnumPrivateConstructor.java
  */
 
 enum EnumPrivateConstructor {
--- a/langtools/test/tools/javac/enum/EnumProtectedConstructor.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/EnumProtectedConstructor.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary enum constructors cannot be declared public or protected
  * @author Joseph D. Darcy
  *
- * @compile/fail -source 1.5 EnumProtectedConstructor.java
+ * @compile/fail EnumProtectedConstructor.java
  */
 
 enum EnumProtectedConstructor {
--- a/langtools/test/tools/javac/enum/EnumPublicConstructor.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/EnumPublicConstructor.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary enum constructors cannot be declared public or protected
  * @author Joseph D. Darcy
  *
- * @compile/fail -source 1.5 EnumPublicConstructor.java
+ * @compile/fail EnumPublicConstructor.java
  */
 
 enum EnumPublicConstructor {
--- a/langtools/test/tools/javac/enum/EnumSwitch1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/EnumSwitch1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary enum switch case labels required to be unqualified.
  * @author gafter
  *
- * @compile -source 1.5 EnumSwitch1.java
+ * @compile EnumSwitch1.java
  */
 
 package enumswitch1;
--- a/langtools/test/tools/javac/enum/EnumSwitch2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/EnumSwitch2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary enum switch case labels required to be unqualified.
  * @author gafter
  *
- * @compile/fail -source 1.5 EnumSwitch2.java
+ * @compile/fail EnumSwitch2.java
  */
 
 package enumswitch2;
--- a/langtools/test/tools/javac/enum/EnumSwitch3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/EnumSwitch3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary javac crash when enum defined after use
  * @author gafter
  *
- * @compile -source 1.5 EnumSwitch3.java
+ * @compile EnumSwitch3.java
  */
 
 package enumswitch3;
--- a/langtools/test/tools/javac/enum/EnumSwitch4.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/EnumSwitch4.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 5006662
  * @summary enum switch on null fails to throw NullPointerException
  * @author gafter
- *
- * @compile -source 1.5 EnumSwitch4.java
- * @run main EnumSwitch4
  */
 
 public enum EnumSwitch4 {
--- a/langtools/test/tools/javac/enum/ExplicitlyAbstractEnum1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/ExplicitlyAbstractEnum1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary enum's cannot be explicitly declared abstract
  * @author Joseph D. Darcy
  *
- * @compile/fail -source 1.5 ExplicitlyAbstractEnum1.java
+ * @compile/fail ExplicitlyAbstractEnum1.java
  */
 
 abstract enum ExplicitlyAbstractEnum1 {
--- a/langtools/test/tools/javac/enum/ExplicitlyAbstractEnum2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/ExplicitlyAbstractEnum2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary enum's cannot be explicitly declared abstract even if they are abstract
  * @author Joseph D. Darcy
  *
- * @compile/fail -source 1.5 ExplicitlyAbstractEnum2.java
+ * @compile/fail ExplicitlyAbstractEnum2.java
  */
 
 abstract enum ExplicitlyAbstractEnum2 {
--- a/langtools/test/tools/javac/enum/ExplicitlyFinalEnum1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/ExplicitlyFinalEnum1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary enum's cannot be explicitly declared final even if they are
  * @author Joseph D. Darcy
  *
- * @compile/fail -source 1.5 ExplicitlyFinalEnum1.java
+ * @compile/fail ExplicitlyFinalEnum1.java
  */
 
 final enum ExplicitlyFinalEnum1 {
--- a/langtools/test/tools/javac/enum/ExplicitlyFinalEnum2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/ExplicitlyFinalEnum2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary enum's cannot be explicitly declared final
  * @author Joseph D. Darcy
  *
- * @compile/fail -source 1.5 ExplicitlyFinalEnum2.java
+ * @compile/fail ExplicitlyFinalEnum2.java
  */
 
 final enum ExplicitlyFinalEnum2 {
--- a/langtools/test/tools/javac/enum/FauxEnum1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/FauxEnum1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary verify java.lang.Enum can't be directly subclassed
  * @author Joseph D. Darcy
  *
- * @compile/fail -source 1.5 FauxEnum1.java
+ * @compile/fail FauxEnum1.java
  */
 
 public class FauxEnum1 extends java.lang.Enum {
--- a/langtools/test/tools/javac/enum/FauxEnum3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/FauxEnum3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary verify an enum type can't be directly subclassed
  * @author Joseph D. Darcy
  *
- * @compile/fail -source 1.5 FauxEnum3.java
+ * @compile/fail FauxEnum3.java
  */
 
 public class FauxEnum3 extends SpecializedEnum {
--- a/langtools/test/tools/javac/enum/FauxSpecialEnum1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/FauxSpecialEnum1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary verify specialized enum classes can't be abstract
  * @author Joseph D. Darcy
  *
- * @compile/fail -source 1.5 FauxSpecialEnum1.java
+ * @compile/fail FauxSpecialEnum1.java
  */
 
 public enum FauxSpecialEnum1 {
--- a/langtools/test/tools/javac/enum/FauxSpecialEnum2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/FauxSpecialEnum2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary verify specialized enum classes can't be abstract
  * @author Joseph D. Darcy
  *
- * @compile/fail -source 1.5 FauxSpecialEnum2.java
+ * @compile/fail FauxSpecialEnum2.java
  */
 
 public enum FauxSpecialEnum2 {
--- a/langtools/test/tools/javac/enum/LocalEnum.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/LocalEnum.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary javac fails to reject local enums
  * @author gafter
  *
- * @compile/fail -source 1.5 LocalEnum.java
+ * @compile/fail LocalEnum.java
  */
 
 public class LocalEnum {
--- a/langtools/test/tools/javac/enum/NoFinal.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/NoFinal.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 5097250 5087624
  * @summary Finalize methods on enums must be compile time error
  * @author Peter von der Ah\u00e9
- * @compile/fail -source 5 NoFinal.java
+ * @compile/fail NoFinal.java
  */
 
 enum NoFinal {
--- a/langtools/test/tools/javac/enum/NoFinal2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/NoFinal2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 5097250 5087624
  * @summary Finalize methods on enums must be compile time error
  * @author Peter von der Ah\u00e9
- * @compile/fail -source 5 NoFinal2.java
+ * @compile/fail NoFinal2.java
  */
 
 enum NoFinal2 {
--- a/langtools/test/tools/javac/enum/NoFinal3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/NoFinal3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 5097250 5087624
  * @summary Finalize methods on enums must be compile time error
  * @author Peter von der Ah\u00e9
- * @compile/fail -source 5 NoFinal3.java
+ * @compile/fail NoFinal3.java
  */
 
 enum NoFinal3 {
--- a/langtools/test/tools/javac/enum/NoFinal4.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/NoFinal4.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 5097250 5087624
  * @summary Finalize methods on enums must be compile time error
  * @author Peter von der Ah\u00e9
- * @compile/fail -source 5 NoFinal4.java
+ * @compile/fail NoFinal4.java
  */
 
 enum NoFinal4 {
--- a/langtools/test/tools/javac/enum/NoFinal5.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/NoFinal5.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 5097250 5087624
  * @summary Finalize methods on enums must be compile time error
  * @author Peter von der Ah\u00e9
- * @compile/fail -source 5 NoFinal5.java
+ * @compile/fail NoFinal5.java
  */
 
 enum NoFinal5 {
--- a/langtools/test/tools/javac/enum/OkFinal.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/OkFinal.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,8 +26,6 @@
  * @bug 5097250
  * @summary Finalize methods on enums must be compile time error
  * @author Peter von der Ah\u00e9
- * @compile -source 5 OkFinal.java
- * @run main OkFinal
  */
 
 public enum OkFinal {
--- a/langtools/test/tools/javac/enum/SynthValues.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/SynthValues.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 4984627
  * @summary Enums: +VALUES field has no synthetic attribute
  * @author gafter
- *
- * @compile -source 1.5 SynthValues.java
- * @run main SynthValues
  */
 
 public enum SynthValues {
--- a/langtools/test/tools/javac/enum/T5075242.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/T5075242.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Cannot make compound type involving Enums
  * @author Peter von der Ah\u00e9
  *
- * @compile -source 5 T5075242.java
+ * @compile T5075242.java
  */
 
 interface Iface {
--- a/langtools/test/tools/javac/enum/T5081785.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/T5081785.java	Thu Jun 11 21:35:12 2009 -0700
@@ -28,10 +28,10 @@
  * @summary Empty Enums allowed in non-static contexts
  * @author Peter von der Ah\u00e9
  *
- * @compile/fail -source 1.5 T5081785.java
- * @compile/fail -source 1.5 T5081785a.java
- * @compile/fail -source 1.5 T5081785b.java
- * @compile/fail -source 1.5 T5081785c.java
+ * @compile/fail T5081785.java
+ * @compile/fail T5081785a.java
+ * @compile/fail T5081785b.java
+ * @compile/fail T5081785c.java
  */
 
 class A {
--- a/langtools/test/tools/javac/enum/TrailingComma.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/TrailingComma.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary enum spec allows trailing comma on enum constant list
  * @author gafter
  *
- * @compile -source 1.5 TrailingComma.java
+ * @compile TrailingComma.java
  */
 
 class TrailingComma {
--- a/langtools/test/tools/javac/enum/UserValue.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/UserValue.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary compiler crash on user-defined valueOf in enum
  * @author gafter
  *
- * @compile -source 1.5 UserValue.java
+ * @compile UserValue.java
  */
 
 public enum UserValue {
--- a/langtools/test/tools/javac/enum/ValueOf.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/ValueOf.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 4872708 5058132
  * @summary Improper signature for valueOf
  * @author gafter
- *
- * @compile -source 1.5 ValueOf.java
- * @run main ValueOf
  */
 
 public enum ValueOf {
--- a/langtools/test/tools/javac/enum/enumSwitch/EnumSwitch.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/enum/enumSwitch/EnumSwitch.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,8 +27,8 @@
  * @summary javac-generated code doesn't obey binary compatibility for enums
  * @author gafter
  *
- * @compile -source 1.5 EnumSwitch.java
- * @compile -source 1.5 Color2.java
+ * @compile EnumSwitch.java
+ * @compile Color2.java
  * @run main EnumSwitch
  */
 
--- a/langtools/test/tools/javac/foreach/Foreach.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/foreach/Foreach.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 4855355
  * @summary implement "foreach" loops as specified in JSR 201
  * @author gafter
- *
- * @compile -source 1.5 Foreach.java
- * @run main Foreach
  */
 
 import java.util.Iterator;
--- a/langtools/test/tools/javac/foreach/GenericIterator.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/foreach/GenericIterator.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary extended 'for' with generic collections causes the compiler to crash
  * @author gafter
  *
- * @compile -source 1.5 GenericIterator.java
+ * @compile GenericIterator.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/foreach/IntersectIterator.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/foreach/IntersectIterator.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 5003207
  * @summary new "for" statement  fails to cast to second upper bound
  * @author gafter
- *
- * @compile -source 1.5 IntersectIterator.java
- * @run main IntersectIterator
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/foreach/ListOfListTest.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/foreach/ListOfListTest.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 4915435
  * @summary NullPointerError in Resolve.findMethod() with foreach vs generics
  * @author gafter
- *
- * @compile -source 1.5 ListOfListTest.java
- * @run main ListOfListTest
  */
 
 import java.util.List;
--- a/langtools/test/tools/javac/foreach/SpecIterable.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/foreach/SpecIterable.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 4911157
  * @summary Runtime error because of missing method in iterator
  * @author gafter
- *
- * @compile -source 1.5 SpecIterable.java
- * @run main SpecIterable
  */
 
 import java.util.Iterator;
--- a/langtools/test/tools/javac/foreach/StaticBlock.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/foreach/StaticBlock.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary compiler crash (NullPointerException) with foreach in static context
  * @author gafter
  *
- * @compile -source 1.5 StaticBlock.java
+ * @compile StaticBlock.java
  */
 
 public class StaticBlock {
--- a/langtools/test/tools/javac/foreach/SuperfluousAbstract.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/foreach/SuperfluousAbstract.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 4912795
  * @summary AbstractMethodError throws if not redeclare abstract iterator() method
  * @author gafter
- *
- * @compile -source 1.5 SuperfluousAbstract.java
- * @run main SuperfluousAbstract
  */
 
 import java.util.AbstractCollection;
--- a/langtools/test/tools/javac/foreach/T6682380.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/foreach/T6682380.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 6682380 6679509
  * @summary Foreach loop with generics inside finally block crashes javac with -target 1.5
  * @author Jan Lahoda, Maurizio Cimadamore
- * @compile -target 1.5 T6682380.java
+ * @compile -source 1.5 -target 1.5 T6682380.java
  */
 
 import java.util.List;
--- a/langtools/test/tools/javac/generics/ArrayClone.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/ArrayClone.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary The clone method on arrays should be strongly typed
  * @author gafter
  *
- * @compile -source 1.5 ArrayClone.java
+ * @compile  ArrayClone.java
  * @run main ArrayClone
  */
 
--- a/langtools/test/tools/javac/generics/ArrayTypearg.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/ArrayTypearg.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: array as generic argument type fails
  * @author gafter
  *
- * @compile -source 1.5 ArrayTypearg.java
+ * @compile  ArrayTypearg.java
  */
 
 import java.util.List;
--- a/langtools/test/tools/javac/generics/BridgeClash.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/BridgeClash.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: incorrect erasure clash reported
  * @author gafter
  *
- * @compile -source 1.5 BridgeClash.java
+ * @compile  BridgeClash.java
  */
 
 interface I<T> {
--- a/langtools/test/tools/javac/generics/BridgeOrder.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/BridgeOrder.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: overridden method gets invoked (bridge method problem)
  * @author gafter
  *
- * @compile -source 1.5 BridgeOrder.java
+ * @compile  BridgeOrder.java
  * @run main BridgeOrder
  */
 
--- a/langtools/test/tools/javac/generics/CastCrash.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/CastCrash.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Crash on cast
  * @author gafter
  *
- * @compile/fail -source 1.5 CastCrash.java
+ * @compile/fail  CastCrash.java
  */
 
 package cast.crash;
--- a/langtools/test/tools/javac/generics/Casting.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/Casting.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics problem with casting
  * @author gafter
  *
- * @compile -source 1.5 Casting.java
+ * @compile  Casting.java
  */
 
 package test.tools.javac.generics.Casting;
--- a/langtools/test/tools/javac/generics/Casting2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/Casting2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary stack overflow error compiling EnumSet.java
  * @author gafter
  *
- * @compile -source 1.5 Casting2.java
+ * @compile  Casting2.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/Casting3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/Casting3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary compiler crash with stack overflow on unchecked cast
  * @author gafter
  *
- * @compile -source 1.5 Casting3.java
+ * @compile  Casting3.java
  */
 
 package test.tools.javac.generics.Casting3;
--- a/langtools/test/tools/javac/generics/Casting4.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/Casting4.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Cannot cast Comparable<?>s
  * @author gafter
  *
- * @compile -Werror -Xlint:unchecked -source 1.5 Casting4.java
+ * @compile -Werror -Xlint:unchecked  Casting4.java
  */
 
 package test.tools.javac.generics.Casting4;
--- a/langtools/test/tools/javac/generics/Conditional.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/Conditional.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Rule for semantics of ?: in the presence of generics and generic class Class
  * @author gafter
  *
- * @compile -source 1.5 Conditional.java
+ * @compile  Conditional.java
  */
 
 package conditional;
--- a/langtools/test/tools/javac/generics/Covar2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/Covar2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Additional unit tests for covariant returns
  * @author gafter
  *
- * @compile -source 1.5 Covar2.java
+ * @compile  Covar2.java
  * @run main Covar2
  */
 
--- a/langtools/test/tools/javac/generics/Covar3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/Covar3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary missing ambiguity error
  * @author gafter
  *
- * @compile/fail -source 1.5 Covar3.java
+ * @compile/fail  Covar3.java
  */
 
 package covar3;
--- a/langtools/test/tools/javac/generics/Covar4.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/Covar4.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary no covariant returns involving primitives
  * @author gafter
  *
- * @compile/fail -source 1.5 Covar4.java
+ * @compile/fail  Covar4.java
  */
 
 public class Covar4 {
--- a/langtools/test/tools/javac/generics/Crash01.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/Crash01.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: crash when using class in bound defined after usage
  * @author gafter
  *
- * @compile -source 1.5 Crash01.java
+ * @compile  Crash01.java
  */
 
 public class Crash01<A extends TestClass1 & IA> {
--- a/langtools/test/tools/javac/generics/Crash02.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/Crash02.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary compiler crash in class writer
  * @author gafter
  *
- * @compile -source 1.5 Crash02.java
+ * @compile  Crash02.java
  */
 
 import java.util.ArrayList;
--- a/langtools/test/tools/javac/generics/CyclicInheritance3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/CyclicInheritance3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 4861743
  * @summary generics: incorrect cyclic inheritance error with type parameters
  *
- * @compile -source 1.5 CyclicInheritance3.java
+ * @compile  CyclicInheritance3.java
  */
 
 class Cycle {
--- a/langtools/test/tools/javac/generics/CyclicInheritance5.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/CyclicInheritance5.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 4862621
  * @summary generics: incorrect cyclic inheritance error
  *
- * @compile -source 1.5 CyclicInheritance5.java
+ * @compile  CyclicInheritance5.java
  */
 
 class G<N extends G.Node<N>> {
--- a/langtools/test/tools/javac/generics/ErasureClashCrash.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/ErasureClashCrash.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary javac crash with improper overrider
  * @author gafter
  *
- * @compile/fail -source 1.5 ErasureClashCrash.java
+ * @compile/fail  ErasureClashCrash.java
  */
 
 interface Compar<T> {
--- a/langtools/test/tools/javac/generics/ExtendedRaw1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/ExtendedRaw1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: extension of raw not treated as raw.
  * @author gafter
  *
- * @compile -source 1.5 ExtendedRaw1.java
+ * @compile  ExtendedRaw1.java
  */
 
 class Comparator<T> {}
--- a/langtools/test/tools/javac/generics/ExtendedRaw2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/ExtendedRaw2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: extension of raw not treated as raw.
  * @author gafter
  *
- * @compile -source 1.5 ExtendedRaw2.java
+ * @compile  ExtendedRaw2.java
  */
 
 // from library
--- a/langtools/test/tools/javac/generics/ExtendedRaw3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/ExtendedRaw3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: bridge method not considered to fulfil interface in abstract class
  * @author gafter
  *
- * @compile -source 1.5 ExtendedRaw3.java
+ * @compile  ExtendedRaw3.java
  */
 
 interface MyComparable<T extends MyComparable<T>> {
--- a/langtools/test/tools/javac/generics/ExtendedRaw4.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/ExtendedRaw4.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary REGRESSION: compatibility problem inheriting raw type
  * @author gafter
  *
- * @compile -source 1.5 ExtendedRaw4.java
+ * @compile  ExtendedRaw4.java
  */
 
 class ExtendedRaw4 extends java.util.TreeSet {}
--- a/langtools/test/tools/javac/generics/FinalBridge.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/FinalBridge.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: bridge for inherited final method can cause verify error
  * @author gafter
  *
- * @compile -source 1.5 FinalBridge.java
+ * @compile  FinalBridge.java
  * @run main FinalBridge
  */
 
--- a/langtools/test/tools/javac/generics/GenLit1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/GenLit1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary compiler crash with ill-formed annotation
  * @author gafter
  *
- * @compile/fail -source 1.5 GenLit1.java
+ * @compile/fail  GenLit1.java
  */
 
 package genLit1;
--- a/langtools/test/tools/javac/generics/GenLit2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/GenLit2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary java allows class literal on generic type parameter array
  * @author gafter
  *
- * @compile/fail -source 1.5 GenLit2.java
+ * @compile/fail  GenLit2.java
  */
 
 package genLit2;
--- a/langtools/test/tools/javac/generics/GenericAnonCtor.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/GenericAnonCtor.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary javac crash on parameterized anonymous constructor invocation
  * @author gafter
  *
- * @compile -source 1.5 GenericAnonCtor.java
+ * @compile  GenericAnonCtor.java
  * @run main GenericAnonCtor
  */
 
--- a/langtools/test/tools/javac/generics/GenericMerge.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/GenericMerge.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: compiler crash merging signatures of generic methods
  * @author gafter
  *
- * @compile -source 1.5 GenericMerge.java
+ * @compile  GenericMerge.java
  */
 
 class Box<T> {}
--- a/langtools/test/tools/javac/generics/GenericOverride.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/GenericOverride.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Cannot override non-trivial generic method
  * @author gafter
  *
- * @compile -source 1.5 GenericOverride.java
+ * @compile  GenericOverride.java
  */
 
 package generic.override;
--- a/langtools/test/tools/javac/generics/GenericThrowable.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/GenericThrowable.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary java.lang.Throwable inheritance in parameterized type
  * @author gafter
  *
- * @compile/fail -source 1.5 GenericThrowable.java
+ * @compile/fail  GenericThrowable.java
  */
 
 class GenericThrowable<T> extends NullPointerException {
--- a/langtools/test/tools/javac/generics/GetClass.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/GetClass.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary the type of x.getClass() is no longer Class<? extends X>
  * @author gafter
  *
- * @compile/fail -source 1.5 GetClass.java
+ * @compile/fail  GetClass.java
  */
 
 public class GetClass {
--- a/langtools/test/tools/javac/generics/GetClass2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/GetClass2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary the type of x.getClass() is Class<? extends |X|>
  * @author seligman
  *
- * @compile -source 1.5 GetClass2.java
+ * @compile  GetClass2.java
  * @run main GetClass2
  */
 
--- a/langtools/test/tools/javac/generics/InheritanceConflict.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/InheritanceConflict.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary two inherited methods with same signature
  * @author gafter, Maurizio Cimadamore
  *
- * @compile/fail -source 1.5 InheritanceConflict.java
+ * @compile/fail  InheritanceConflict.java
  */
 
 package inheritance.conflict;
--- a/langtools/test/tools/javac/generics/InheritanceConflict2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/InheritanceConflict2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary two inherited methods with same signature
  * @author gafter, Maurizio Cimadamore
  *
- * @compile -source 1.5 InheritanceConflict2.java
+ * @compile  InheritanceConflict2.java
  */
 
 package inheritance.conflict2;
--- a/langtools/test/tools/javac/generics/InheritanceConflict3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/InheritanceConflict3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary two inherited methods with same signature
  * @author darcy
  *
- * @compile/fail -source 1.5 InheritanceConflict3.java
+ * @compile/fail  InheritanceConflict3.java
  */
 
 package inheritance.conflict3;
--- a/langtools/test/tools/javac/generics/InnerInterface1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/InnerInterface1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Inner interfaces are not treated as static
  * @author gafter
  *
- * @compile -source 1.5 InnerInterface1.java
+ * @compile  InnerInterface1.java
  */
 
 package test.tools.javac.generics.InnerInterface1;
--- a/langtools/test/tools/javac/generics/InnerInterface2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/InnerInterface2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary inner interface causes "not within bounds"
  * @author gafter
  *
- * @compile -source 1.5 InnerInterface2.java
+ * @compile  InnerInterface2.java
  */
 
 package test.tools.javac.generics.InnerInterface2;
--- a/langtools/test/tools/javac/generics/InstanceOf1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/InstanceOf1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary the type in an instanceof expression must be reifiable
  * @author seligman
  *
- * @compile -source 1.5 InstanceOf1.java
+ * @compile  InstanceOf1.java
  */
 
 public class InstanceOf1 {
--- a/langtools/test/tools/javac/generics/InstanceOf2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/InstanceOf2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary the type in an instanceof expression must be reifiable
  * @author seligman
  *
- * @compile/fail -source 1.5 InstanceOf2.java
+ * @compile/fail  InstanceOf2.java
  */
 
 public class InstanceOf2 {
--- a/langtools/test/tools/javac/generics/InstanceOf3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/InstanceOf3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary the type in an instanceof expression must be reifiable
  * @author seligman
  *
- * @compile/fail -source 1.5 InstanceOf3.java
+ * @compile/fail  InstanceOf3.java
  */
 
 public class InstanceOf3 {
--- a/langtools/test/tools/javac/generics/InterfaceCast1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/InterfaceCast1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary overridden interface method causes the compiler to reject cast
  * @author gafter
  *
- * @compile -source 1.5 InterfaceCast1.java
+ * @compile  InterfaceCast1.java
  */
 
 public class InterfaceCast1 {
--- a/langtools/test/tools/javac/generics/LoadOrder.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/LoadOrder.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: generic class files can cause recursive class loading (crashing javac)
  * @author gafter
  *
- * @compile -source 1.5 LoadOrder.java
+ * @compile  LoadOrder.java
  */
 
 import java.util.Collections;
--- a/langtools/test/tools/javac/generics/MissingBridge.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/MissingBridge.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Calling inherited generics method via interface causes AbstractMethodError
  * @author gafter
  *
- * @compile -source 1.5 MissingBridge.java
+ * @compile  MissingBridge.java
  * @run main MissingBridge
  */
 
--- a/langtools/test/tools/javac/generics/MissingCast.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/MissingCast.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary redundant cast with generified APIs causes verify error
  * @author gafter
  *
- * @compile -source 1.5 MissingCast.java
+ * @compile  MissingCast.java
  * @run main MissingCast
  */
 
--- a/langtools/test/tools/javac/generics/Multibound1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/Multibound1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary javac failed to check second bound
  * @author gafter
  *
- * @compile/fail -source 1.5 Multibound1.java
+ * @compile/fail  Multibound1.java
  */
 
 package test.tools.javac.generics.Multibound1;
--- a/langtools/test/tools/javac/generics/MultipleInheritance.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/MultipleInheritance.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics problem with multiple interface extension
  * @author gafter
  *
- * @compile -source 1.5 MultipleInheritance.java
+ * @compile  MultipleInheritance.java
  */
 
 package test.tools.javac.generics.MultipleInheritance;
--- a/langtools/test/tools/javac/generics/NameOrder.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/NameOrder.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: type inference failure due to a bug in ClassSymbol.isLess
  * @author gafter
  *
- * @compile -source 1.5 NameOrder.java
+ * @compile  NameOrder.java
  */
 
 package test.tools.javac.generics.NameOrder;
--- a/langtools/test/tools/javac/generics/Nonlinear.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/Nonlinear.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary A bug in the original JSR14 generics specification
  *          created a loophole in the type system.
  *
- * @compile/fail -source 1.5 Nonlinear.java
+ * @compile/fail  Nonlinear.java
  */
 
 
--- a/langtools/test/tools/javac/generics/ParametricException.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/ParametricException.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: parametric exception type versus overriding
  * @author gafter
  *
- * @compile -source 1.5 ParametricException.java
+ * @compile  ParametricException.java
  */
 
 import java.io.*;
--- a/langtools/test/tools/javac/generics/ParenVerify.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/ParenVerify.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: verify error when redundant parens used!
  * @author gafter
  *
- * @compile -source 1.5 ParenVerify.java
+ * @compile  ParenVerify.java
  * @run main ParenVerify
  */
 
--- a/langtools/test/tools/javac/generics/PermuteBound.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/PermuteBound.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: subtyping problem when type parameters permuted
  * @author gafter
  *
- * @compile -source 1.5 PermuteBound.java
+ * @compile  PermuteBound.java
  */
 
 package test.tools.javac.generics.PermuteBound;
--- a/langtools/test/tools/javac/generics/PrimitiveClass.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/PrimitiveClass.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary int.class and ilk have wrong type (5028351 rejected)
  * @author gafter
  *
- * @compile -source 1.5 PrimitiveClass.java
+ * @compile  PrimitiveClass.java
  */
 
 package primitive._class;
--- a/langtools/test/tools/javac/generics/PrimitiveVariant.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/PrimitiveVariant.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary compiler allows overriding with different primitive return type
  * @author gafter
  *
- * @compile/fail -source 1.5 PrimitiveVariant.java
+ * @compile/fail  PrimitiveVariant.java
  */
 
 package test.tools.javac.generics.PrimitiveVariant;
--- a/langtools/test/tools/javac/generics/RawClient.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/RawClient.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary javac should implement JLS3 three-pass overload resolution
  * @author gafter
  *
- * @compile -source 1.5 RawClient.java
+ * @compile  RawClient.java
  */
 
 package rawClient;
--- a/langtools/test/tools/javac/generics/RefEqual.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/RefEqual.java	Thu Jun 11 21:35:12 2009 -0700
@@ -28,7 +28,7 @@
  * @author gafter
  *
  * @compile -source 1.4 RefEqual.java
- * @compile/fail -source 1.5 RefEqual.java
+ * @compile/fail  RefEqual.java
  */
 
 class RefEqual {
--- a/langtools/test/tools/javac/generics/RelaxedArrays.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/RelaxedArrays.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary relaxed rules for array of generic type and varargs.
  * @author gafter
  *
- * @compile -source 1.5 RelaxedArrays.java
+ * @compile  RelaxedArrays.java
  * @run main RelaxedArrays
  */
 
--- a/langtools/test/tools/javac/generics/ReverseOrder.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/ReverseOrder.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary problem with generic signature for reverseOrder
  * @author gafter
  *
- * @compile -source 1.5 ReverseOrder.java
+ * @compile  ReverseOrder.java
  */
 
 package test.reverseOrder;
--- a/langtools/test/tools/javac/generics/SelfImplement.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/SelfImplement.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: reject implementation with incorrect return type
  * @author gafter
  *
- * @compile/fail -source 1.5 SelfImplement.java
+ * @compile/fail  SelfImplement.java
  */
 
 class SelfImplement {
--- a/langtools/test/tools/javac/generics/SilentUnchecked.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/SilentUnchecked.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary unchecked conversion from raw to reifiable generic requires no warning
  * @author gafter
  *
- * @compile -Xlint:unchecked -Werror -source 1.5 SilentUnchecked.java
+ * @compile -Xlint:unchecked -Werror  SilentUnchecked.java
  */
 
 package silent.unchecked;
--- a/langtools/test/tools/javac/generics/SuperTypeargs.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/SuperTypeargs.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary compilation error for super.<T,E>f() and ClassName.super.<T,E>f()
  * @author gafter
  *
- * @compile -source 1.5 SuperTypeargs.java
+ * @compile  SuperTypeargs.java
  */
 
 package superTypeargs;
--- a/langtools/test/tools/javac/generics/T4661029.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/T4661029.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @summary generics: assertion error using Arrays.fill
  * @author gafter
  *
- * @compile -source 1.5 T4661029.java
+ * @compile  T4661029.java
  */
 
 public class T4661029 {
--- a/langtools/test/tools/javac/generics/T4683314.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/T4683314.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: overload resolution error in non-generic code
  * @author gafter
  *
- * @compile -source 1.5 T4683314.java
+ * @compile  T4683314.java
  */
 
 class T4683314a {
--- a/langtools/test/tools/javac/generics/T4684378.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/T4684378.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: verify error in generated bytecode
  * @author gafter
  *
- * @compile -source 1.5 T4684378.java
+ * @compile  T4684378.java
  * @run main T4684378
  */
 
--- a/langtools/test/tools/javac/generics/T4695348.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/T4695348.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: compiler allows ref to type bounds in static members
  * @author gafter
  *
- * @compile/fail -source 1.5 T4695348.java
+ * @compile/fail  T4695348.java
  */
 
 class T4695348<T> {
--- a/langtools/test/tools/javac/generics/T4695415.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/T4695415.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: bug in type inference when method result used as an argument
  * @author gafter
  *
- * @compile -source 1.5 T4695415.java
+ * @compile  T4695415.java
  */
 
 class X<T extends Number> {
--- a/langtools/test/tools/javac/generics/T4695847.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/T4695847.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: problem with inference of primitive return values
  * @author gafter
  *
- * @compile -source 1.5 T4695847.java
+ * @compile  T4695847.java
  */
 
 public class T4695847<T> {
--- a/langtools/test/tools/javac/generics/T4711570.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/T4711570.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: problem with methods when type parameter doesn't appear in signature
  * @author gafter
  *
- * @compile -source 1.5 T4711570.java
+ * @compile  T4711570.java
  */
 
 class T4711570 {
--- a/langtools/test/tools/javac/generics/T4711572.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/T4711572.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: problem with type inference for recursive methods
  * @author gafter
  *
- * @compile -source 1.5 T4683314.java
+ * @compile  T4683314.java
  */
 
 class T4711572 {
--- a/langtools/test/tools/javac/generics/T4711694.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/T4711694.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: missing bridge method for inherited implementation
  * @author gafter
  *
- * @compile -source 1.5 T4711694.java
+ * @compile  T4711694.java
  * @run main T4711694
  */
 
--- a/langtools/test/tools/javac/generics/T4738171.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/T4738171.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: problem with equivalence of generic types
  * @author gafter
  *
- * @compile/fail -source 1.5 T4738171.java
+ * @compile/fail  T4738171.java
  */
 
 interface If<T> {
--- a/langtools/test/tools/javac/generics/T4739399.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/T4739399.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: crash after error regarding bounds on type variable
  * @author gafter
  *
- * @compile/fail -source 1.5 T4739399.java
+ * @compile/fail  T4739399.java
  */
 
 class T4739399 {
--- a/langtools/test/tools/javac/generics/T4757416.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/T4757416.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: erasure clash not detected
  * @author gafter
  *
- * @compile/fail -source 1.5 T4757416.java
+ * @compile/fail  T4757416.java
  */
 
 class T4756416 {
--- a/langtools/test/tools/javac/generics/T4784207a.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/T4784207a.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,8 +27,8 @@
  * @summary generics: method overriding missed with separate compilation
  * @author gafter
  *
- * @compile -source 1.5 T4784207a.java
- * @compile -source 1.5 T4784207b.java
+ * @compile  T4784207a.java
+ * @compile  T4784207b.java
  */
 
 interface T4784207a_i extends Comparable<T4784207a_i>{
--- a/langtools/test/tools/javac/generics/T4784219.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/T4784219.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: compiler crash after diagnostic
  * @author gafter
  *
- * @compile -source 1.5 T4683314.java
+ * @compile  T4683314.java
  */
 
 public class T4784219 {
--- a/langtools/test/tools/javac/generics/T5011073.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/T5011073.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary javac should implement JLS3 three-pass overload resolution
  * @author gafter
  *
- * @compile/fail -source 1.5 T5011073.java
+ * @compile/fail  T5011073.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/T5094318.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/T5094318.java	Thu Jun 11 21:35:12 2009 -0700
@@ -28,7 +28,7 @@
  *
  * @compile -source 1.4 T5094318.java
  * @run main T5094318
- * @compile -source 1.5 T5094318.java
+ * @compile  T5094318.java
  * @run main/fail T5094318
  */
 
--- a/langtools/test/tools/javac/generics/TyparamLit.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/TyparamLit.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: compiler allows T.class for type variable T
  * @author gafter
  *
- * @compile/fail -source 1.5 TyparamLit.java
+ * @compile/fail  TyparamLit.java
  */
 
 class TyparamLit<T> {
--- a/langtools/test/tools/javac/generics/TyparamStaticScope.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/TyparamStaticScope.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary javac mistakenly reports static use error for enclosing type parameter
  * @author gafter
  *
- * @compile -source 1.5 TyparamStaticScope.java
+ * @compile  TyparamStaticScope.java
  */
 
 package typaram.static_.scope;
--- a/langtools/test/tools/javac/generics/TyparamStaticScope2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/TyparamStaticScope2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary type parameter referenced in static inner class improperly allowed!
  * @author gafter
  *
- * @compile/fail -source 1.5 TyparamStaticScope2.java
+ * @compile/fail  TyparamStaticScope2.java
  */
 
 package typaram.static_.scope2;
--- a/langtools/test/tools/javac/generics/UncheckedArray.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/UncheckedArray.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary compiler allows new array of array of type parameter
  * @author gafter
  *
- * @compile/fail -source 1.5 UncheckedArray.java
+ * @compile/fail  UncheckedArray.java
  */
 
 package unchecked.array;
--- a/langtools/test/tools/javac/generics/UncheckedConstructor.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/UncheckedConstructor.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,8 +27,8 @@
  * @summary compiler disallows raw call to generic constructor
  * @author gafter
  *
- * @compile      -source 1.5 -Werror                  UncheckedConstructor.java
- * @compile/fail -source 1.5 -Werror -Xlint:unchecked UncheckedConstructor.java
+ * @compile       -Werror                  UncheckedConstructor.java
+ * @compile/fail  -Werror -Xlint:unchecked UncheckedConstructor.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/UncheckedCovariance.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/UncheckedCovariance.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,8 +27,8 @@
  * @summary A method returning a raw type cannot override a method returning a generic type
  * @author gafter
  *
- * @compile -source 1.5 UncheckedCovariance.java
- * @compile/fail -Xlint:unchecked -Werror -source 1.5 UncheckedCovariance.java
+ * @compile  UncheckedCovariance.java
+ * @compile/fail -Xlint:unchecked -Werror  UncheckedCovariance.java
  */
 
 class UncheckedCovariance {
--- a/langtools/test/tools/javac/generics/UnsoundInference.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/UnsoundInference.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Generic method allowing passing of types that don't match collection types
  * @author gafter
  *
- * @compile/fail -source 1.5 UnsoundInference.java
+ * @compile/fail  UnsoundInference.java
  */
 
 import java.util.ArrayList;
--- a/langtools/test/tools/javac/generics/Varargs.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/Varargs.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary varargs doesn't work for generic methods
  * @author gafter
  *
- * @compile -source 1.5 Varargs.java
+ * @compile  Varargs.java
  */
 
 package varargs.versus.generics;
--- a/langtools/test/tools/javac/generics/Varargs2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/Varargs2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics + varargs API changes
  * @author gafter
  *
- * @compile -source 1.5 Varargs2.java
+ * @compile  Varargs2.java
  * @run main Varargs2
  */
 
--- a/langtools/test/tools/javac/generics/WrongNew.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/WrongNew.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: javac generares "new" of wrong class
  * @author gafter
  *
- * @compile -source 1.5 WrongNew.java
+ * @compile  WrongNew.java
  * @run main WrongNew
  */
 
--- a/langtools/test/tools/javac/generics/abstract/T4717181c.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/abstract/T4717181c.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary javac treats inherited abstract method as an overrider
  * @author gafter
  *
- * @compile/fail -source 1.5 T4717181c.java
+ * @compile/fail  T4717181c.java
  */
 
 class T4717181c {
--- a/langtools/test/tools/javac/generics/bridge1/D.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/bridge1/D.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: missing bridge method
  * @author gafter
  *
- * @compile -source 1.5 A.java C.java D.java E.java
+ * @compile  A.java C.java D.java E.java
  * @run main D
  */
 
--- a/langtools/test/tools/javac/generics/classreader/HArrayMethod.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/classreader/HArrayMethod.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,8 +27,8 @@
  * @summary generics: override checks break when using separate compilation
  * @author gafter
  *
- * @compile -source 1.5 HArrayMethod.java HMember.java HMethod.java HMethodImpl.java
- * @compile -source 1.5 HArrayMethod.java
+ * @compile  HArrayMethod.java HMember.java HMethod.java HMethodImpl.java
+ * @compile  HArrayMethod.java
  */
 
 class HArrayMethod extends HMethodImpl {
--- a/langtools/test/tools/javac/generics/compat/CovariantCompat1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/compat/CovariantCompat1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: non-generic code should be able to call covariant method
  * @author gafter
  *
- * @compile -source 1.5 CovariantCompat1.java
+ * @compile  CovariantCompat1.java
  * @compile -source 1.4 CovariantCompat2.java
  */
 
--- a/langtools/test/tools/javac/generics/compat/OverrideBridge1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/compat/OverrideBridge1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,10 +27,10 @@
  * @summary generics: compiler allows 1.4 code to override a bridge method
  * @author gafter
  *
- * @compile -source 1.5 OverrideBridge1.java
+ * @compile  OverrideBridge1.java
  * @compile/fail -Werror -source 1.4 OverrideBridge2.java
  * @compile -source 1.4 OverrideBridge2.java
- * @compile -source 1.5 OverrideBridge3.java
+ * @compile  OverrideBridge3.java
  */
 
 // ALLOW users to override bridge methods.
--- a/langtools/test/tools/javac/generics/forwardSeparateBound/ForwardSeparateBound2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/forwardSeparateBound/ForwardSeparateBound2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,8 +27,8 @@
  * @summary generics: forward referenced bounds vs separate compilation
  * @author gafter
  *
- * @compile -source 1.5 ForwardSeparateBound1.java ForwardSeparateBound2.java
- * @compile -source 1.5 ForwardSeparateBound2.java
+ * @compile  ForwardSeparateBound1.java ForwardSeparateBound2.java
+ * @compile  ForwardSeparateBound2.java
  */
 
 class Z {}
--- a/langtools/test/tools/javac/generics/genericAbstract/A.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/genericAbstract/A.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: generic interface method not implemented in abstract class causes err
  * @author gafter
  *
- * @compile -source 1.5 A.java B.java
+ * @compile  A.java B.java
  */
 
 interface A {
--- a/langtools/test/tools/javac/generics/inference/6365166/NewTest.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/inference/6365166/NewTest.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,6 @@
  * @test
  * @bug     6365166
  * @summary javac (generic) unable to resolve methods
- * @ignore  waiting for 6365166
  * @compile NewTest.java
  */
 
--- a/langtools/test/tools/javac/generics/odersky/BadTest.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/odersky/BadTest.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Negative regression test from odersky
  * @author odersky
  *
- * @compile/fail -source 1.5 BadTest.java
+ * @compile/fail  BadTest.java
  */
 
 class BadTest {
--- a/langtools/test/tools/javac/generics/odersky/BadTest2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/odersky/BadTest2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Regression test from odersky
  * @author odersky
  *
- * @compile -source 1.5 BadTest2.java
+ * @compile  BadTest2.java
  */
 
 // this used to be a negative regression test, but when we
--- a/langtools/test/tools/javac/generics/odersky/BadTest3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/odersky/BadTest3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Negative regression test from odersky
  * @author odersky
  *
- * @compile/fail -source 1.5 BadTest3.java
+ * @compile/fail  BadTest3.java
  */
 
 class BadTest3 {
--- a/langtools/test/tools/javac/generics/odersky/BadTest4.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/odersky/BadTest4.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Negative regression test from odersky
  * @author odersky
  *
- * @compile/fail -source 1.5 BadTest4.java
+ * @compile/fail  BadTest4.java
  */
 
 class BadTest4 {
--- a/langtools/test/tools/javac/generics/odersky/Test.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/odersky/Test.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Positive regression test from odersky
  * @author odersky
  *
- * @compile -source 1.5 Test.java
+ * @compile  Test.java
  */
 
 class Test {
--- a/langtools/test/tools/javac/generics/odersky/Test2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/odersky/Test2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Positive regression test from odersky
  * @author odersky
  *
- * @compile -source 1.5 Test2.java
+ * @compile  Test2.java
  */
 
 class Test2 {
--- a/langtools/test/tools/javac/generics/odersky/Test3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/odersky/Test3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Positive regression test from odersky
  * @author odersky
  *
- * @compile -source 1.5 Test3.java
+ * @compile  Test3.java
  */
 
 class Test3 {
--- a/langtools/test/tools/javac/generics/odersky/Test4.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/odersky/Test4.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Positive regression test from odersky
  * @author odersky
  *
- * @compile -source 1.5 Test4.java
+ * @compile  Test4.java
  */
 
 class Test4 {
--- a/langtools/test/tools/javac/generics/parametricException/J.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/parametricException/J.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,8 +27,8 @@
  * @summary javac appears to omit throws portion of generic signature attribute
  * @author gafter
  *
- * @compile -source 1.5 J.java
- * @compile -source 1.5 K.java
+ * @compile  J.java
+ * @compile  K.java
  */
 
 class J<T extends Exception> {
--- a/langtools/test/tools/javac/generics/rare/Rare1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/rare/Rare1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary "rare" types
  * @author gafter
  *
- * @compile -source 1.5 Rare1.java
+ * @compile  Rare1.java
  */
 
 package rare1;
--- a/langtools/test/tools/javac/generics/rare/Rare10.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/rare/Rare10.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary "rare" types
  * @author gafter
  *
- * @compile -source 1.5 Rare10.java
+ * @compile  Rare10.java
  */
 
 package rare10;
--- a/langtools/test/tools/javac/generics/rare/Rare11.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/rare/Rare11.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary "rare" types
  * @author gafter
  *
- * @compile -source 1.5 Rare11.java
+ * @compile  Rare11.java
  */
 
 package rare11;
--- a/langtools/test/tools/javac/generics/rare/Rare2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/rare/Rare2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary "rare" types
  * @author gafter
  *
- * @compile/fail -source 1.5 Rare2.java
+ * @compile/fail  Rare2.java
  */
 
 package rare2;
--- a/langtools/test/tools/javac/generics/rare/Rare3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/rare/Rare3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary "rare" types
  * @author gafter
  *
- * @compile/fail -source 1.5 Rare3.java
+ * @compile/fail  Rare3.java
  */
 
 package rare3;
--- a/langtools/test/tools/javac/generics/rare/Rare4.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/rare/Rare4.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary "rare" types
  * @author gafter
  *
- * @compile/fail -source 1.5 Rare4.java
+ * @compile/fail  Rare4.java
  */
 
 package rare4;
--- a/langtools/test/tools/javac/generics/rare/Rare5.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/rare/Rare5.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary "rare" types
  * @author gafter
  *
- * @compile/fail -source 1.5 Rare5.java
+ * @compile/fail  Rare5.java
  */
 
 package rare5;
--- a/langtools/test/tools/javac/generics/rare/Rare6.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/rare/Rare6.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary "rare" types
  * @author gafter
  *
- * @compile/fail -source 1.5 Rare6.java
+ * @compile/fail  Rare6.java
  */
 
 package rare6;
--- a/langtools/test/tools/javac/generics/rare/Rare7.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/rare/Rare7.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary "rare" types
  * @author gafter
  *
- * @compile/fail -source 1.5 Rare7.java
+ * @compile/fail  Rare7.java
  */
 
 package rare7;
--- a/langtools/test/tools/javac/generics/rare/Rare8.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/rare/Rare8.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary "rare" types
  * @author gafter
  *
- * @compile -source 1.5 Rare8.java
+ * @compile  Rare8.java
  */
 
 package rare8;
--- a/langtools/test/tools/javac/generics/rare/Rare9.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/rare/Rare9.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary "rare" types
  * @author gafter
  *
- * @compile -source 1.5 Rare9.java
+ * @compile  Rare9.java
  */
 
 package rare9;
--- a/langtools/test/tools/javac/generics/rawSeparate/RetroLexer.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/rawSeparate/RetroLexer.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,9 +27,9 @@
  * @summary raw types versus separate compilation causes type error
  * @author gafter
  *
- * @compile -source 1.5 Hashtable.java
- * @compile -source 1.5 CharScanner.java
- * @compile -source 1.5 RetroLexer.java
+ * @compile  Hashtable.java
+ * @compile  CharScanner.java
+ * @compile  RetroLexer.java
  */
 
 package parser;
--- a/langtools/test/tools/javac/generics/typeargs/Basic.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/typeargs/Basic.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary explicit type arguments
  * @author gafter
  *
- * @compile -source 1.5 Basic.java
+ * @compile  Basic.java
  */
 
 // Test all of the basic forms for explicit type arguments
--- a/langtools/test/tools/javac/generics/typeargs/Metharg1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/typeargs/Metharg1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary explicit type arguments
  * @author gafter
  *
- * @compile/fail -source 1.5 Metharg1.java
+ * @compile/fail  Metharg1.java
  */
 
 // Test type mismatch on type argument for method call
--- a/langtools/test/tools/javac/generics/typeargs/Metharg2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/typeargs/Metharg2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary explicit type arguments
  * @author gafter
  *
- * @compile/fail -source 1.5 Metharg2.java
+ * @compile/fail  Metharg2.java
  */
 
 // Test type mismatch on type argument for qualified method call
--- a/langtools/test/tools/javac/generics/typeargs/Newarg1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/typeargs/Newarg1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary explicit type arguments
  * @author gafter
  *
- * @compile/fail -source 1.5 Newarg1.java
+ * @compile/fail  Newarg1.java
  */
 
 // Test type mismatch on type argument for constructor
--- a/langtools/test/tools/javac/generics/typeargs/Newarg2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/typeargs/Newarg2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary explicit type arguments
  * @author gafter
  *
- * @compile/fail -source 1.5 Newarg2.java
+ * @compile/fail  Newarg2.java
  */
 
 // Test type mismatch on type argument for inner constructor
--- a/langtools/test/tools/javac/generics/typeargs/Superarg1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/typeargs/Superarg1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary explicit type arguments
  * @author gafter
  *
- * @compile/fail -source 1.5 Superarg1.java
+ * @compile/fail  Superarg1.java
  */
 
 // Test type mismatch on type argument for super constructor
--- a/langtools/test/tools/javac/generics/typeargs/Superarg2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/typeargs/Superarg2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary explicit type arguments
  * @author gafter
  *
- * @compile/fail -source 1.5 Superarg2.java
+ * @compile/fail  Superarg2.java
  */
 
 // Test type mismatch on type argument for inner super constructor
--- a/langtools/test/tools/javac/generics/typeargs/ThisArg.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/typeargs/ThisArg.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary explicit type arguments
  * @author gafter
  *
- * @compile/fail -source 1.5 ThisArg.java
+ * @compile/fail  ThisArg.java
  */
 
 // Test type mismatch on type argument for this constructor
--- a/langtools/test/tools/javac/generics/typevars/4856983/T4856983.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/typevars/4856983/T4856983.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary (crash) mutually f-bounded type vars with multiple bounds may crash javac
  * @author Peter von der Ah\u00e9
  *
- * @compile -source 5 T4856983.java
+ * @compile  T4856983.java
  */
 
 import java.lang.Comparable;
--- a/langtools/test/tools/javac/generics/typevars/4856983/T4856983a.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/typevars/4856983/T4856983a.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 4856983
  * @summary (crash) mutually f-bounded type vars with multiple bounds may crash javac
  * @author Peter von der Ah\u00e9
- * @compile/fail -source 5 T4856983a.java
+ * @compile/fail  T4856983a.java
  */
 
 interface I1 { Number m(); }
--- a/langtools/test/tools/javac/generics/typevars/4856983/T4856983b.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/typevars/4856983/T4856983b.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 4856983
  * @summary (crash) mutually f-bounded type vars with multiple bounds may crash javac
  * @author Peter von der Ah\u00e9
- * @compile/fail -source 5 T4856983b.java
+ * @compile/fail  T4856983b.java
  */
 
 interface I1 { Number m(); }
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,7 @@
  * @test
  * @summary Test subtyping for wildcards with related type bounds.
  *
- * @compile -source 1.5 AssignmentDifferentTypes1.java
+ * @compile  AssignmentDifferentTypes1.java
  */
 
 public class AssignmentDifferentTypes1 {
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,7 @@
  * @test
  * @summary Test subtyping for wildcards with related type bounds.
  *
- * @compile/fail -source 1.5 AssignmentDifferentTypes2.java
+ * @compile/fail  AssignmentDifferentTypes2.java
  */
 
 public class AssignmentDifferentTypes2 {
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,7 @@
  * @test
  * @summary Test subtyping for wildcards with related type bounds.
  *
- * @compile/fail -source 1.5 AssignmentDifferentTypes3.java
+ * @compile/fail  AssignmentDifferentTypes3.java
  */
 
 public class AssignmentDifferentTypes3 {
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes4.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes4.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,7 @@
  * @test
  * @summary Test subtyping for wildcards with related type bounds.
  *
- * @compile/fail -source 1.5 AssignmentDifferentTypes4.java
+ * @compile/fail  AssignmentDifferentTypes4.java
  */
 
 public class AssignmentDifferentTypes4 {
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes5.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes5.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,7 @@
  * @test
  * @summary Test subtyping for wildcards with related type bounds.
  *
- * @compile/fail -source 1.5 AssignmentDifferentTypes5.java
+ * @compile/fail  AssignmentDifferentTypes5.java
  */
 
 public class AssignmentDifferentTypes5 {
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes6.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes6.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,7 @@
  * @test
  * @summary Test subtyping for wildcards with related type bounds.
  *
- * @compile/fail -source 1.5 AssignmentDifferentTypes6.java
+ * @compile/fail  AssignmentDifferentTypes6.java
  */
 
 public class AssignmentDifferentTypes6 {
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes7.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes7.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,7 @@
  * @test
  * @summary Test subtyping for wildcards with related type bounds.
  *
- * @compile/fail -source 1.5 AssignmentDifferentTypes7.java
+ * @compile/fail  AssignmentDifferentTypes7.java
  */
 
 public class AssignmentDifferentTypes7 {
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes8.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes8.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,7 @@
  * @test
  * @summary Test subtyping for wildcards with related type bounds.
  *
- * @compile/fail -source 1.5 AssignmentDifferentTypes8.java
+ * @compile/fail  AssignmentDifferentTypes8.java
  */
 
 public class AssignmentDifferentTypes8 {
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes9.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes9.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,7 @@
  * @test
  * @summary Test subtyping for wildcards with related type bounds.
  *
- * @compile/fail -source 1.5 AssignmentDifferentTypes9.java
+ * @compile/fail  AssignmentDifferentTypes9.java
  */
 
 public class AssignmentDifferentTypes9 {
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentSameType1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentSameType1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,7 @@
  * @test
  * @summary Test subtyping for wildcards with the same type bound.
  *
- * @compile -source 1.5 AssignmentSameType1.java
+ * @compile  AssignmentSameType1.java
  */
 
 public class AssignmentSameType1 {
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentSameType2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentSameType2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,7 @@
  * @test
  * @summary Test subtyping for wildcards with the same type bound.
  *
- * @compile/fail -source 1.5 AssignmentSameType2.java
+ * @compile/fail  AssignmentSameType2.java
  */
 
 public class AssignmentSameType2 {
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentSameType3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentSameType3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,7 @@
  * @test
  * @summary Test subtyping for wildcards with the same type bound.
  *
- * @compile/fail -source 1.5 AssignmentSameType3.java
+ * @compile/fail  AssignmentSameType3.java
  */
 
 public class AssignmentSameType3 {
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentSameType4.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentSameType4.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,7 @@
  * @test
  * @summary Test subtyping for wildcards with the same type bound.
  *
- * @compile/fail -source 1.5 AssignmentSameType4.java
+ * @compile/fail  AssignmentSameType4.java
  */
 
 public class AssignmentSameType4 {
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentSameType5.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentSameType5.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,7 @@
  * @test
  * @summary Test subtyping for wildcards with the same type bound.
  *
- * @compile/fail -source 1.5 AssignmentSameType5.java
+ * @compile/fail  AssignmentSameType5.java
  */
 
 public class AssignmentSameType5 {
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentSameType6.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentSameType6.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,7 @@
  * @test
  * @summary Test subtyping for wildcards with the same type bound.
  *
- * @compile/fail -source 1.5 AssignmentSameType6.java
+ * @compile/fail  AssignmentSameType6.java
  */
 
 public class AssignmentSameType6 {
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentSameType7.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentSameType7.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,7 @@
  * @test
  * @summary Test subtyping for wildcards with the same type bound.
  *
- * @compile/fail -source 1.5 AssignmentSameType7.java
+ * @compile/fail  AssignmentSameType7.java
  */
 
 public class AssignmentSameType7 {
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentSameType8.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentSameType8.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,7 @@
  * @test
  * @summary Test subtyping for wildcards with the same type bound.
  *
- * @compile/fail -source 1.5 AssignmentSameType8.java
+ * @compile/fail  AssignmentSameType8.java
  */
 
 public class AssignmentSameType8 {
--- a/langtools/test/tools/javac/generics/wildcards/BoundBug.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/BoundBug.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: used of ? get bound error
  * @author gafter
  *
- * @compile -source 1.5 BoundBug.java
+ * @compile  BoundBug.java
  */
 
 class BoundBug {
--- a/langtools/test/tools/javac/generics/wildcards/ContraArg.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/ContraArg.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: incorrect ambiguity error with super-bouded wildcards
  * @author gafter
  *
- * @compile -source 1.5 ContraArg.java
+ * @compile  ContraArg.java
  */
 
 class ContraArg {
--- a/langtools/test/tools/javac/generics/wildcards/T5097548.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/T5097548.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 5097548
  * @summary (crash) Stack overflow in capture conversion
  * @author Peter von der Ah\u00e9
- * @compile -source 5 T5097548.java
+ * @compile  T5097548.java
  * @run main T5097548
  */
 
--- a/langtools/test/tools/javac/generics/wildcards/T5097548b.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/T5097548b.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 5097548
  * @summary Stack overflow in capture conversion
  * @author Peter von der Ah\u00e9
- * @compile -source 5 T5097548b.java
+ * @compile  T5097548b.java
  */
 
 interface Edge<N extends Node<? extends Edge<N>>> {
--- a/langtools/test/tools/javac/generics/wildcards/UnboundArray.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/UnboundArray.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: allow arrays of unbounded generic types
  * @author gafter
  *
- * @compile -source 1.5 UnboundArray.java
+ * @compile  UnboundArray.java
  */
 
 class C<E> {
--- a/langtools/test/tools/javac/generics/wildcards/neg/AmbiguousCast.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/AmbiguousCast.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary cast to parameterized type is accepted although it should be rejected
  * @author gafter
  *
- * @compile/fail -source 1.5 -Werror -Xlint:unchecked AmbiguousCast.java
+ * @compile/fail  -Werror -Xlint:unchecked AmbiguousCast.java
  */
 
 class Test {
--- a/langtools/test/tools/javac/generics/wildcards/neg/Capture.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/Capture.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Wildcard capture
  * @author gafter
  *
- * @compile/fail -source 1.5 Capture.java
+ * @compile/fail  Capture.java
  */
 
 class X<T> {}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail1.java
+ * @compile/fail  CastFail1.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail10.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail10.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail10.java
+ * @compile/fail  CastFail10.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail11.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail11.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail11.java
+ * @compile/fail  CastFail11.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail12.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail12.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail12.java
+ * @compile/fail  CastFail12.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail13.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail13.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail13.java
+ * @compile/fail  CastFail13.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail14.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail14.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail14.java
+ * @compile/fail  CastFail14.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail15.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail15.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail15.java
+ * @compile/fail  CastFail15.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail16.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail16.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail16.java
+ * @compile/fail  CastFail16.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail17.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail17.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail17.java
+ * @compile/fail  CastFail17.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail18.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail18.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail18.java
+ * @compile/fail  CastFail18.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail19.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail19.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail19.java
+ * @compile/fail  CastFail19.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail2.java
+ * @compile/fail  CastFail2.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail20.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail20.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail20.java
+ * @compile/fail  CastFail20.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail21.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail21.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail20.java
+ * @compile/fail  CastFail20.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail3.java
+ * @compile/fail  CastFail3.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail4.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail4.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail4.java
+ * @compile/fail  CastFail4.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail5.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail5.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail5.java
+ * @compile/fail  CastFail5.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail6.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail6.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail6.java
+ * @compile/fail  CastFail6.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail7.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail7.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail7.java
+ * @compile/fail  CastFail7.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail8.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail8.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail8.java
+ * @compile/fail  CastFail8.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail9.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail9.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 CastFail9.java
+ * @compile/fail  CastFail9.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn10.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastWarn10.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 -Werror -Xlint:unchecked CastWarn10.java
+ * @compile/fail  -Werror -Xlint:unchecked CastWarn10.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn11.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastWarn11.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 -Werror -Xlint:unchecked CastWarn11.java
+ * @compile/fail  -Werror -Xlint:unchecked CastWarn11.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn12.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastWarn12.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 -Werror -Xlint:unchecked CastWarn12.java
+ * @compile/fail  -Werror -Xlint:unchecked CastWarn12.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn13.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastWarn13.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 -Werror -Xlint:unchecked CastWarn13.java
+ * @compile/fail  -Werror -Xlint:unchecked CastWarn13.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn14.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastWarn14.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 -Werror -Xlint:unchecked CastWarn14.java
+ * @compile/fail  -Werror -Xlint:unchecked CastWarn14.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastWarn2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 -Werror -Xlint:unchecked CastWarn2.java
+ * @compile/fail  -Werror -Xlint:unchecked CastWarn2.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastWarn3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 -Werror -Xlint:unchecked CastWarn3.java
+ * @compile/fail  -Werror -Xlint:unchecked CastWarn3.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn4.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastWarn4.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 -Werror -Xlint:unchecked CastWarn4.java
+ * @compile/fail  -Werror -Xlint:unchecked CastWarn4.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn5.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastWarn5.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 -Werror -Xlint:unchecked CastWarn5.java
+ * @compile/fail  -Werror -Xlint:unchecked CastWarn5.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn6.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastWarn6.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 -Werror -Xlint:unchecked CastWarn6.java
+ * @compile/fail  -Werror -Xlint:unchecked CastWarn6.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn7.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastWarn7.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 -Werror -Xlint:unchecked CastWarn7.java
+ * @compile/fail  -Werror -Xlint:unchecked CastWarn7.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn8.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastWarn8.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 -Werror -Xlint:unchecked CastWarn8.java
+ * @compile/fail  -Werror -Xlint:unchecked CastWarn8.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn9.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastWarn9.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile/fail -source 1.5 -Werror -Xlint:unchecked CastWarn9.java
+ * @compile/fail  -Werror -Xlint:unchecked CastWarn9.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/neg/ParamCast.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/ParamCast.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Description
  * @author gafter
  *
- * @compile/fail -source 1.5 ParamCast.java
+ * @compile/fail  ParamCast.java
  */
 
 class A<T> {}
--- a/langtools/test/tools/javac/generics/wildcards/neg/Readonly.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/Readonly.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary an extends-bound (covariant) wildcard is like readonly
  * @author gafter
  *
- * @compile/fail -source 1.5 Readonly.java
+ * @compile/fail  Readonly.java
  */
 
 class Err<T> {
--- a/langtools/test/tools/javac/generics/wildcards/neg/Unbounded.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/Unbounded.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary an unbounded (bivariant) wildcard doesn't allow reading
  * @author gafter
  *
- * @compile/fail -source 1.5 Unbounded.java
+ * @compile/fail  Unbounded.java
  */
 
 import java.util.Stack;
--- a/langtools/test/tools/javac/generics/wildcards/pos/AmbiguousCast2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/pos/AmbiguousCast2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: unable to cast between two convertible types
  * @author gafter
  *
- * @compile -source 1.5 AmbiguousCast2.java
+ * @compile  AmbiguousCast2.java
  */
 
 import java.lang.ref.*;
--- a/langtools/test/tools/javac/generics/wildcards/pos/BoundsCollision.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/pos/BoundsCollision.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary when upper bounds and lower bounds collide
  * @author gafter
  *
- * @compile -source 1.5 -Werror BoundsCollision.java
+ * @compile  -Werror BoundsCollision.java
  */
 
 class StreinBug {
--- a/langtools/test/tools/javac/generics/wildcards/pos/Capture.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/pos/Capture.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Wildcard capture
  * @author gafter
  *
- * @compile -source 1.5 -Werror Capture.java
+ * @compile  -Werror Capture.java
  */
 
 class X<T> {}
--- a/langtools/test/tools/javac/generics/wildcards/pos/CastTest.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/pos/CastTest.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test casts (legal, warning, and errors)
  * @author gafter
  *
- * @compile -source 1.5 -Werror CastTest.java
+ * @compile  -Werror CastTest.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/pos/InstanceOf.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/pos/InstanceOf.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: type cast with instance of
  * @author gafter
  *
- * @compile -source 1.5 -Werror InstanceOf.java
+ * @compile  -Werror InstanceOf.java
  */
 
 class InstanceOf<T> {
--- a/langtools/test/tools/javac/generics/wildcards/pos/ParamCast.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/pos/ParamCast.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary integrate improved wildcard substitution from CPH
  * @author gafter
  *
- * @compile -source 1.5 -Werror -Xlint:unchecked ParamCast.java
+ * @compile  -Werror -Xlint:unchecked ParamCast.java
  */
 
 class A<T> {}
--- a/langtools/test/tools/javac/generics/wildcards/pos/RvalConversion.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/pos/RvalConversion.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary rvalue conversion changes "? extends X" to "X".
  * @author gafter
  *
- * @compile -source 1.5 RvalConversion.java
+ * @compile  RvalConversion.java
  */
 
 import java.util.*;
--- a/langtools/test/tools/javac/generics/wildcards/pos/UncheckedCast1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/pos/UncheckedCast1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generics: failure of some unchecked casts
  * @author gafter
  *
- * @compile -source 1.5 UncheckedCast1.java
+ * @compile  UncheckedCast1.java
  */
 
 class Z {
--- a/langtools/test/tools/javac/importscope/A.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/importscope/A.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary static import of private field crashes compiler
  * @author gafter
  *
- * @compile -source 1.5 A.java B.java
+ * @compile A.java B.java
  */
 
 package p1;
--- a/langtools/test/tools/javac/limits/FinallyNesting.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/limits/FinallyNesting.java	Thu Jun 11 21:35:12 2009 -0700
@@ -29,7 +29,7 @@
  *
  * @compile -source 1.4 -target 1.4 FinallyNesting.java
  */
-
+// Source and target 1.4 are needed for the test to pass with default memory sizes.
 class FinallyNesting {
     public static void main(String[] args) {
         int x;
--- a/langtools/test/tools/javac/lint/Unchecked.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/lint/Unchecked.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Add -Xlint flag
  * @author gafter
  *
- * @compile/fail -source 1.5 -Xlint:unchecked -Werror Unchecked.java
+ * @compile/fail -Xlint:unchecked -Werror Unchecked.java
  */
 
 class Unchecked<T> {
--- a/langtools/test/tools/javac/miranda/T4666866.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/miranda/T4666866.java	Thu Jun 11 21:35:12 2009 -0700
@@ -4,7 +4,7 @@
  * @summary REGRESSION: Generated error message unhelpful for missing methods
  * @author gafter
  *
- * @compile/fail/ref=T4666866.out -XDstdout -XDdiags=%b:%l:%_%m T4666866.java
+ * @compile/fail/ref=T4666866.out -XDstdout -XDrawDiagnostics T4666866.java
  */
 
 class t implements Runnable {}
--- a/langtools/test/tools/javac/miranda/T4666866.out	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/miranda/T4666866.out	Thu Jun 11 21:35:12 2009 -0700
@@ -1,4 +1,2 @@
-T4666866.java:10: t is not abstract and does not override abstract method run() in java.lang.Runnable
-class t implements Runnable {}
-^
+T4666866.java:10:1: compiler.err.does.not.override.abstract: t, run(), java.lang.Runnable
 1 error
--- a/langtools/test/tools/javac/miranda/T4711325.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/miranda/T4711325.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary compiler allows unimplementable interfaces
  * @author gafter
  *
- * @compile -source 1.5 T4711325.java
+ * @compile                  T4711325.java
  * @compile/fail -source 1.4 T4711325.java
  */
 
--- a/langtools/test/tools/javac/mixedTarget/CompatibleAbstracts1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/mixedTarget/CompatibleAbstracts1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,14 +27,14 @@
  * @summary 1.4 javac should not accept the Covariant Return Type
  * @author gafter
  *
- * @compile      -source 1.5 CompatibleAbstracts1.java
- * @compile      -source 1.5 CompatibleAbstracts2.java
+ * @compile                  CompatibleAbstracts1.java
+ * @compile                  CompatibleAbstracts2.java
  * @compile      -source 1.4 CompatibleAbstracts2.java
- * @compile      -source 1.5 CompatibleAbstracts3.java
+ * @compile                  CompatibleAbstracts3.java
  * @compile/fail -source 1.4 CompatibleAbstracts3.java
- * @compile      -source 1.5 CompatibleAbstracts4.java
+ * @compile                  CompatibleAbstracts4.java
  * @compile/fail -source 1.4 CompatibleAbstracts4.java
- * @compile      -source 1.5 CompatibleAbstracts5.java
+ * @compile                  CompatibleAbstracts5.java
  * @compile/fail -source 1.4 CompatibleAbstracts5.java
  */
 
--- a/langtools/test/tools/javac/mixedTarget/ExtendCovariant2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/mixedTarget/ExtendCovariant2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -28,7 +28,7 @@
  * @author gafter
  *
  * @compile/fail -source 1.4 ExtendCovariant2.java
- * @compile -source 1.5 ExtendCovariant2.java
+ * @compile                  ExtendCovariant2.java
  */
 
 /**
--- a/langtools/test/tools/javac/overload/T5090220.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/overload/T5090220.java	Thu Jun 11 21:35:12 2009 -0700
@@ -25,7 +25,7 @@
  * @test
  * @bug 5090220
  * @summary Autoboxing applied when calculating most-specific method
- * @compile/fail -source 5 T5090220.java
+ * @compile/fail T5090220.java
  */
 
 class T5090220 {
--- a/langtools/test/tools/javac/processing/6348499/A.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/processing/6348499/A.java	Thu Jun 11 21:35:12 2009 -0700
@@ -28,7 +28,7 @@
 import javax.lang.model.element.*;
 
 @SupportedAnnotationTypes("*")
-@SupportedSourceVersion(SourceVersion.RELEASE_6)
+@SupportedSourceVersion(SourceVersion.RELEASE_7)
 public class A extends AbstractProcessor {
     public boolean process(Set<? extends TypeElement> tes, RoundEnvironment renv) {
         Filer filer = processingEnv.getFiler();
--- a/langtools/test/tools/javac/processing/6414633/A.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/processing/6414633/A.java	Thu Jun 11 21:35:12 2009 -0700
@@ -30,7 +30,7 @@
 import javax.tools.*;
 
 @SupportedAnnotationTypes("*")
-@SupportedSourceVersion(SourceVersion.RELEASE_6)
+@SupportedSourceVersion(SourceVersion.RELEASE_7)
 public class A extends AbstractProcessor {
 
     public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
--- a/langtools/test/tools/javac/processing/6430209/b6341534.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/processing/6430209/b6341534.java	Thu Jun 11 21:35:12 2009 -0700
@@ -30,7 +30,7 @@
 import java.util.Set;
 
 @SupportedAnnotationTypes({"*"})
-@SupportedSourceVersion(javax.lang.model.SourceVersion.RELEASE_6)
+@SupportedSourceVersion(javax.lang.model.SourceVersion.RELEASE_7)
 public class b6341534 extends AbstractProcessor {
     static int r = 0;
     static Elements E = null;
--- a/langtools/test/tools/javac/processing/T6439826.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/processing/T6439826.java	Thu Jun 11 21:35:12 2009 -0700
@@ -39,7 +39,7 @@
 
 
 @SupportedAnnotationTypes("*")
-@SupportedSourceVersion(SourceVersion.RELEASE_6 )
+@SupportedSourceVersion(SourceVersion.RELEASE_7 )
 public class T6439826 extends AbstractProcessor {
     public static void main(String... args) {
         String testSrc = System.getProperty("test.src", ".");
--- a/langtools/test/tools/javac/processing/environment/TestSourceVersion.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/processing/environment/TestSourceVersion.java	Thu Jun 11 21:35:12 2009 -0700
@@ -34,6 +34,8 @@
  * @compile -processor TestSourceVersion -proc:only -source   5 -AExpectedVersion=RELEASE_5 HelloWorld.java
  * @compile -processor TestSourceVersion -proc:only -source 1.6 -AExpectedVersion=RELEASE_6 HelloWorld.java
  * @compile -processor TestSourceVersion -proc:only -source   6 -AExpectedVersion=RELEASE_6 HelloWorld.java
+ * @compile -processor TestSourceVersion -proc:only -source 1.7 -AExpectedVersion=RELEASE_7 HelloWorld.java
+ * @compile -processor TestSourceVersion -proc:only -source   7 -AExpectedVersion=RELEASE_7 HelloWorld.java
  */
 
 import java.util.Set;
--- a/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -4,7 +4,7 @@
  * @summary Verify correct implementation of JLS2e 6.6.2.1
  * @author maddox
  *
- * @compile/fail/ref=ProtectedMemberAccess2.out -XDstdout -XDdiags=%b:%l:%_%m ProtectedMemberAccess2.java
+ * @compile/fail/ref=ProtectedMemberAccess2.out -XDstdout -XDdiags=-simpleNames -XDdiagsFormat=%b:%l:%_%m ProtectedMemberAccess2.java
  */
 
 // 71 errors expected.
--- a/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -4,7 +4,7 @@
  * @summary Verify correct implementation of JLS2e 6.6.2.1
  * @author maddox
  *
- * @compile/fail/ref=ProtectedMemberAccess3.out -XDstdout -XDdiags=%b:%l:%_%m ProtectedMemberAccess3.java
+ * @compile/fail/ref=ProtectedMemberAccess3.out -XDstdout -XDdiags=-simpleNames -XDdiagsFormat=%b:%l:%_%m ProtectedMemberAccess3.java
  */
 
 // 46 errors expected.
--- a/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess4.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess4.java	Thu Jun 11 21:35:12 2009 -0700
@@ -4,7 +4,7 @@
  * @summary Verify correct implementation of JLS2e 6.6.2.1
  * @author maddox
  *
- * @compile/fail/ref=ProtectedMemberAccess4.out -XDstdout -XDdiags=%b:%l:%_%m ProtectedMemberAccess4.java
+ * @compile/fail/ref=ProtectedMemberAccess4.out -XDstdout -XDdiags=-simpleNames -XDdiagsFormat=%b:%l:%_%m ProtectedMemberAccess4.java
  */
 
 // 33 errors expected.
--- a/langtools/test/tools/javac/stackmap/T4955930.sh	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/stackmap/T4955930.sh	Thu Jun 11 21:35:12 2009 -0700
@@ -56,7 +56,7 @@
 TMP1=T4955930.javap
 
 cp "${TESTSRC}${FS}T4955930.java" .
-"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -target 6 T4955930.java
+"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -source 6 -target 6 T4955930.java
 result=$?
 if [ $result -ne 0 ]
 then
--- a/langtools/test/tools/javac/stackmap/UninitThis.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/stackmap/UninitThis.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,9 +26,6 @@
  * @bug 4948063
  * @summary Invalid java.io.FileInputStream with v49 generate by javac
  * @author gafter
- *
- * @compile -source 1.5 -target 1.5 UninitThis.java
- * @run main UninitThis
  */
 
 // may fail due to VM bug 4948729
--- a/langtools/test/tools/javac/staticImport/Ambig1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/staticImport/Ambig1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Missing ambiguity error when two methods are equally specific
  * @author gafter
  *
- * @compile/fail -source 1.5 Ambig1.java
+ * @compile/fail  Ambig1.java
  */
 
 package ambig1;
--- a/langtools/test/tools/javac/staticImport/ImportInherit.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/staticImport/ImportInherit.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary static import versus inherited members
  * @author gafter
  *
- * @compile -source 1.5 ImportInherit.java
+ * @compile  ImportInherit.java
  */
 
 package importInherit;
--- a/langtools/test/tools/javac/staticImport/ImportPrivate.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/staticImport/ImportPrivate.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary NPE while compiling static import of inaccessible class member
  * @author gafter
  *
- * @compile/fail -source 1.5 ImportPrivate.java
+ * @compile/fail  ImportPrivate.java
  */
 
 package importPrivate;
--- a/langtools/test/tools/javac/staticImport/PrivateStaticImport.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/staticImport/PrivateStaticImport.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary static import of private field crashes compiler
  * @author gafter
  *
- * @compile/fail -source 1.5 PrivateStaticImport.java
+ * @compile/fail  PrivateStaticImport.java
  */
 
 package psi;
--- a/langtools/test/tools/javac/staticImport/Shadow.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/staticImport/Shadow.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary compiler fails to shadow inapplicable method with static import
  * @author gafter
  *
- * @compile/fail -source 1.5 Shadow.java
+ * @compile/fail  Shadow.java
  */
 
 package shadow;
--- a/langtools/test/tools/javac/staticImport/StaticImport.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/staticImport/StaticImport.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary add support for JSR 201's static import facility
  * @author gafter
  *
- * @compile -source 1.5 StaticImport.java
+ * @compile  StaticImport.java
  * @run main StaticImport
  */
 
--- a/langtools/test/tools/javac/staticImport/StaticImport2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/staticImport/StaticImport2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary add support for JSR 201's static import facility
  * @author gafter
  *
- * @compile/fail -source 1.5 StaticImport2.java
+ * @compile/fail  StaticImport2.java
  */
 
 package p;
--- a/langtools/test/tools/javac/unicode/Unmappable.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/unicode/Unmappable.java	Thu Jun 11 21:35:12 2009 -0700
@@ -29,7 +29,7 @@
  *
  * @compile              -encoding ascii -source 1.5 Unmappable.java
  * @compile/fail -Werror -encoding ascii -source 1.5 Unmappable.java
- * @compile/fail         -encoding ascii -source 6 Unmappable.java
+ * @compile/fail         -encoding ascii             Unmappable.java
  */
 
 // example from 4766897
--- a/langtools/test/tools/javac/varargs/Anon.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/varargs/Anon.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary varargs versus anonymous constructors crashes javac
  * @author gafter
  *
- * @compile -source 1.5 Anon.java
+ * @compile  Anon.java
  */
 
 class Anon {
--- a/langtools/test/tools/javac/varargs/BadSyntax2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/varargs/BadSyntax2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary generic class method with vararg gets "java.lang.AssertionError: arraycode T"
  * @author gafter
  *
- * @compile -source 1.5 BadSyntax2.java
+ * @compile  BadSyntax2.java
  */
 
 class Tclass<T> {
--- a/langtools/test/tools/javac/varargs/Varargs1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/varargs/Varargs1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary varags, auto boxing
  * @author gafter
  *
- * @compile -source 1.5 Varargs1.java
+ * @compile  Varargs1.java
  * @run main Varargs1
  */
 
--- a/langtools/test/tools/javac/varargs/VarargsOverride.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/varargs/VarargsOverride.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,8 +27,8 @@
  * @summary overriding with method of different arity is prohibited
  * @author gafter
  *
- * @compile -source 1.5 VarargsOverride.java
- * @compile/fail -source 1.5 -Werror -Xlint VarargsOverride.java
+ * @compile  VarargsOverride.java
+ * @compile/fail  -Werror -Xlint VarargsOverride.java
  */
 
 package varargs.override;
--- a/langtools/test/tools/javac/varargs/Warn1.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/varargs/Warn1.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,9 +27,9 @@
  * @summary need warning if varargs argument isn't boxed
  * @author gafter
  *
- * @compile      -source 1.5                     Warn1.java
- * @compile/fail -source 1.5 -Werror             Warn1.java
- * @compile      -source 1.5 -Werror -Xlint:none Warn1.java
+ * @compile                           Warn1.java
+ * @compile/fail  -Werror             Warn1.java
+ * @compile       -Werror -Xlint:none Warn1.java
  */
 
 package varargs.warn1;
--- a/langtools/test/tools/javac/varargs/Warn2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/varargs/Warn2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,9 +27,9 @@
  * @summary need warning if varargs argument isn't boxed
  * @author gafter
  *
- * @compile      -source 1.5                     Warn2.java
- * @compile/fail -source 1.5 -Werror             Warn2.java
- * @compile      -source 1.5 -Werror -Xlint:none Warn2.java
+ * @compile                           Warn2.java
+ * @compile/fail  -Werror             Warn2.java
+ * @compile       -Werror -Xlint:none Warn2.java
  */
 
 package varargs.warn2;
--- a/langtools/test/tools/javac/varargs/warning/Warn2.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/varargs/warning/Warn2.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary fixed-arity warning given too often
  * @author gafter
  *
- * @compile -Werror -source 1.5 Warn2.java
+ * @compile -Werror  Warn2.java
  */
 
 package varargs.warning.warn2;
--- a/langtools/test/tools/javac/varargs/warning/Warn3.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/varargs/warning/Warn3.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary fixed-arity warning given too often
  * @author gafter
  *
- * @compile -Werror -source 1.5 Warn3.java
+ * @compile -Werror  Warn3.java
  */
 
 package varargs.warning.warn3;
--- a/langtools/test/tools/javac/versions/check.sh	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javac/versions/check.sh	Thu Jun 11 21:35:12 2009 -0700
@@ -24,9 +24,8 @@
 # @test
 # @bug 4981566 5028634 5094412 6304984
 # @summary Check interpretation of -target and -source options
-#
 # @build CheckClassFileVersion
-# @run shell check.sh
+# @run shell check.sh 
 
 TESTJAVA=${TESTJAVA:?}
 TC=${TESTCLASSES-.}
@@ -48,19 +47,26 @@
   $JC ${TESTTOOLVMOPTS} -d $TC $* $TC/X.java && $CFV $TC/X.class $V || exit 2
 }
 
-check 50.0
 check 48.0 -source 1.4
+
 check 49.0 -source 1.4 -target 1.5
-check 49.0 -target 1.5
-check 50.0 -source 1.5
-check 50.0 -target 1.6
-check 50.0 -target 6
-check 50.0 -source 1.6
-check 50.0 -source 6
+check 49.0 -source 1.5 -target 1.5
+
+check 50.0 -source 1.4 -target 1.6
+check 50.0 -source 1.5 -target 1.6
+check 50.0 -source 1.6 -target 1.6
+check 50.0 -source 1.6 -target 6
+check 50.0 -source 6 -target 1.6
+check 50.0 -source 6 -target 6
+
+check 51.0
+check 51.0 -source 1.5
+check 51.0 -source 1.6
+check 51.0 -source 6
+check 51.0 -source 1.7
+check 51.0 -source 7
 check 51.0 -target 1.7
 check 51.0 -target 7
-check 51.0 -source 1.7
-check 51.0 -source 7
 
 
 # Check source versions
@@ -85,21 +91,30 @@
   fi
 }
 
+# the following need to be updated when -source 7 features are available
 checksrc14() { pass $* $TC/X.java; fail $* $TC/Y.java; }
 checksrc15() { pass $* $TC/X.java; pass $* $TC/Y.java; }
 checksrc16() { checksrc15 $* ; }
+checksrc17() { checksrc15 $* ; }
 
 checksrc14 -source 1.4
 checksrc14 -source 1.4 -target 1.5
 
-checksrc15
-checksrc15 -target 1.5
 checksrc15 -source 1.5
+checksrc15 -source 1.5 -target 1.5
 
-checksrc16 -target 1.6
-checksrc16 -target 6
 checksrc16 -source 1.6
 checksrc16 -source 6
+checksrc16 -source 1.6 -target 1.6
+checksrc16 -source 6 -target 6
+
+checksrc17
+checksrc17 -target 1.7
+checksrc17 -target 7
+checksrc17 -source 1.7
+checksrc17 -source 7
+checksrc17 -source 1.7 -target 1.7
+checksrc17 -source 7 -target 7
 
 fail -source 1.5 -target 1.4 $TC/X.java
 fail -source 1.6 -target 1.4 $TC/X.java
--- a/langtools/test/tools/javadoc/LangVers.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/LangVers.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,8 +26,6 @@
  * @bug 4909767
  * @summary Verify that omitting Doclet.languageVersion() hides 1.5 language
  *      features from the doclet.
- * @compile -source 1.5 LangVers.java
- * @run main LangVers
  */
 
 import java.util.List;
--- a/langtools/test/tools/javadoc/annotations/annotateMethodsFields/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/annotations/annotateMethodsFields/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -28,7 +28,7 @@
  *          annotation type elements.
  *          Test an annotation type with a type nested within.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/annotations/annotatePackage/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/annotations/annotatePackage/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 5031168
  * @summary Test package annotations and package-info.java package comments.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/annotations/annotateParams/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/annotations/annotateParams/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 5031171
  * @summary Test parameter annotations.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/annotations/defaults/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/annotations/defaults/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test an annotation type with default element values, and
  *          annotations that use them.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/annotations/elementTypes/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/annotations/elementTypes/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Test an annotation type and annotations with elements of various
  *          types.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/annotations/shortcuts/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/annotations/shortcuts/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 4904495
  * @summary Verify that "shortcuts" are used when printing annotations.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/enum/docComments/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/enum/docComments/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 4421066
  * @summary Verify the comments in an enum type.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/enum/enumType/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/enum/enumType/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 4421066
  * @summary Verify the contents of an enum type.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/generics/genericClass/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/generics/genericClass/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 4421066
  * @summary Verify the contents of the ClassDoc of a generic class.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/generics/genericInnerAndOuter/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/generics/genericInnerAndOuter/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Verify the contents of the ClassDoc of
  *          a generic class with a generic inner class.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/generics/genericInterface/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/generics/genericInterface/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 4421066
  * @summary Verify the contents of the ClassDoc of a generic interface.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/generics/genericMethod/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/generics/genericMethod/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 4421066
  * @summary Verify the reading of generic methods and constructors.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/generics/genericSuper/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/generics/genericSuper/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 4421066
  * @summary Verify the contents of the ClassDoc of a generic class.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/generics/supertypes/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/generics/supertypes/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 4922918
  * @summary Check supertypes and superinterfaces of parameterized types.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/generics/throwsGeneric/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/generics/throwsGeneric/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 4421066
  * @summary Verify the reading of generic methods and constructors.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/generics/tparamCycle/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/generics/tparamCycle/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 4421066
  * @summary Check a type parameter whose bound cycles back on itself.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/generics/tparamTagOnMethod/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/generics/tparamTagOnMethod/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 4421066
  * @summary Verify the reading of type parameter tags on methods.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/generics/tparamTagOnType/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/generics/tparamTagOnType/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 4421066
  * @summary Verify the reading of a type parameter tag on an interface.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/generics/wildcards/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/generics/wildcards/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 4421066
  * @summary Verify the contents of the ClassDoc of a generic class.
  * @library ../../lib
- * @compile -source 1.5 ../../lib/Tester.java Main.java
+ * @compile  ../../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javadoc/lib/Tester.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/lib/Tester.java	Thu Jun 11 21:35:12 2009 -0700
@@ -39,7 +39,6 @@
     protected final String TEST_CLASSES = System.getProperty("test.classes",
                                                              ".");
     private final String DEFAULT_ARGS[] = {
-        "-source", "1.5",
         "-sourcepath", TEST_SRC,
     };
 
--- a/langtools/test/tools/javadoc/varArgs/Main.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javadoc/varArgs/Main.java	Thu Jun 11 21:35:12 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Verify the contents of a ClassDoc containing a varArgs method.
  *          Verify that see/link tags can use "..." notation.
  * @library ../lib
- * @compile -source 1.5 ../lib/Tester.java Main.java
+ * @compile  ../lib/Tester.java Main.java
  * @run main Main
  */
 
--- a/langtools/test/tools/javap/ExtPath.java	Wed Jul 05 16:54:26 2017 +0200
+++ b/langtools/test/tools/javap/ExtPath.java	Thu Jun 11 21:35:12 2009 -0700
@@ -30,11 +30,12 @@
  * @run main/othervm ExtPath com.sun.crypto.provider.SunJCE
  */
 
-import sun.tools.javap.Main;
+import com.sun.tools.javap.Main;
 import java.io.*;
 
 public class ExtPath {
     public static void main(String[] args) {
-        Main.entry(args);
+        PrintWriter pw = new PrintWriter(System.out, true);
+        Main.run(args, pw);
     }
 }
--- a/langtools/test/tools/javap/ListTest.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-/*
- * Copyright 2008 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-import java.io.*;
-import java.util.*;
-import javax.tools.*;
-
-/*
- * @test
- * @bug 6439940
- * @summary Cleanup javap implementation
- * @run main/othervm ListTest
- */
-public class ListTest {
-    public static void main(String[] args) throws Exception {
-        new ListTest().run();
-    }
-
-    ListTest() {
-        String v = System.getProperty("view.cmd");
-        //      v = "/opt/teamware/7.7/bin/filemerge -r";
-        if (v != null) {
-            viewResults = true;
-            viewCmd = Arrays.asList(v.split(" +"));
-        }
-    }
-
-    void run() throws Exception {
-        StandardLocation[] locs = new StandardLocation[] {
-            StandardLocation.PLATFORM_CLASS_PATH,
-            StandardLocation.CLASS_PATH,
-        };
-
-        int count = 0;
-        int pass = 0;
-        for (StandardLocation loc: locs) {
-            for (String testClassName: list(loc)) {
-                count++;
-                if (test(testClassName))
-                    pass++;
-            }
-        }
-
-        if (pass < count)
-            throw new Error(pass + "/" + count + " test cases passed");
-    }
-
-    Iterable<String> list(StandardLocation loc) throws IOException {
-        JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-        StandardJavaFileManager sfm = compiler.getStandardFileManager(null, null, null);
-        Set<JavaFileObject.Kind> kinds = Collections.singleton(JavaFileObject.Kind.CLASS);
-
-        List<String> list = new ArrayList<String>();
-        for (JavaFileObject fo: sfm.list(loc, testPackage, kinds, true)) {
-            //System.err.println(com.sun.tools.javac.util.Old199.getPath(fo));
-            list.add(sfm.inferBinaryName(loc, fo));
-        }
-        return list;
-    }
-
-    boolean test(String testClassName) throws Exception {
-        String[] args = new String[options.size() + 1];
-        options.toArray(args);
-        args[args.length - 1] = testClassName;
-        byte[] oldOut = runOldJavap(args);
-        byte[] newOut = runNewJavap(args);
-        boolean ok = equal(oldOut, newOut);
-        System.err.println((ok ? "pass" : "FAIL") + ": " + testClassName);
-        if (!ok && viewResults)
-            view(oldOut, newOut);
-        return ok;
-    }
-
-    byte[] runOldJavap(String[] args) {
-        //System.err.println("OLD: " + Arrays.asList(args));
-        PrintStream oldOut = System.out;
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
-        System.setOut(new PrintStream(out));
-        try {
-            sun.tools.javap.Main.entry(args);
-        } finally {
-            System.setOut(oldOut);
-        }
-        return out.toByteArray();
-    }
-
-    byte[] runNewJavap(String[] args) {
-        String[] nArgs = new String[args.length + 2];
-        nArgs[0] = "-XDcompat";
-        nArgs[1] = "-XDignore.symbol.file";
-        System.arraycopy(args, 0, nArgs, 2, args.length);
-        //System.err.println("NEW: " + Arrays.asList(nArgs));
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
-        com.sun.tools.javap.Main.run(nArgs,
-                                     new PrintWriter(new OutputStreamWriter(out), true));
-        return out.toByteArray();
-    }
-
-    File write(byte[] text, String suffix) throws IOException {
-        File f = new File("ListTest." + suffix);
-        FileOutputStream out = new FileOutputStream(f);
-        out.write(text);
-        out.close();
-        return f;
-    }
-
-    boolean equal(byte[] a1, byte[] a2) {
-        return Arrays.equals(a1, a2);
-    }
-
-    void view(byte[] oldOut, byte[] newOut) throws Exception {
-        File oldFile = write(oldOut, "old");
-        File newFile = write(newOut, "new");
-        List<String> cmd = new ArrayList<String>();
-        cmd.addAll(viewCmd);
-        cmd.add(oldFile.getPath());
-        cmd.add(newFile.getPath());
-        Process p = new ProcessBuilder(cmd).redirectErrorStream(true).start();
-        p.getOutputStream().close();
-        String line;
-        BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
-        while ((line = in.readLine()) != null)
-            System.err.println(line);
-        in.close();
-        p.waitFor();
-    }
-
-    String testPackage = "java.lang";
-    List<String> options = Arrays.asList("-v");
-    boolean viewResults;
-    List<String> viewCmd;
-}
--- a/langtools/test/tools/javap/OptionTest.java	Wed Jul 05 16:54:26 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-/*
- * Copyright 2007-2008 Sun Microsystems, Inc.  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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-import java.io.*;
-import java.util.*;
-
-/*
- * @test
- * @bug 6439940
- * @summary Cleanup javap implementation
- * @run main/othervm OptionTest
- */
-public class OptionTest {
-    public static void main(String[] args) throws Exception {
-        new OptionTest().run();
-    }
-
-    OptionTest() {
-        String v = System.getProperty("view.cmd");
-        if (v != null) {
-            viewResults = true;
-            viewCmd = Arrays.asList(v.split(" +"));
-        }
-    }
-
-
-    void run() throws Exception {
-        int count = 0;
-        int pass = 0;
-        // try combinations of options and compare old javap against new javap
-        for (int i = 0; i < (1<<8); i++) {
-            List<String> options = new ArrayList<String>();
-            if ((i & 0x01) != 0)
-                options.add("-c");
-            if ((i & 0x02) != 0)
-                options.add("-l");
-            if ((i & 0x04) != 0)
-                options.add("-public");
-            if ((i & 0x08) != 0)
-                options.add("-protected");
-            if ((i & 0x10) != 0)
-                options.add("-package");
-            if ((i & 0x20) != 0)
-                options.add("-private");
-            if ((i & 0x40) != 0)
-                options.add("-s");
-            if ((i & 0x80) != 0)
-                options.add("-verbose");
-            count++;
-            if (test(options))
-                pass++;
-        }
-
-        if (pass < count)
-            throw new Error(pass + "/" + count + " test cases passed");
-    }
-
-    boolean test(List<String> options) throws Exception {
-        String[] args = new String[options.size() + 1];
-        options.toArray(args);
-        args[args.length - 1] = testClassName;
-        String oldOut = runOldJavap(args);
-        String newOut = runNewJavap(args);
-        boolean ok = oldOut.equals(newOut);
-        System.err.println((ok ? "pass" : "FAIL") + ": " + options);
-        if (!ok && viewResults)
-            view(oldOut, newOut);
-        return ok;
-    }
-
-    String runOldJavap(String[] args) {
-        //System.err.println("OLD: " + Arrays.asList(args));
-        PrintStream oldOut = System.out;
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
-        System.setOut(new PrintStream(out));
-        try {
-            sun.tools.javap.Main.entry(args);
-        } finally {
-            System.setOut(oldOut);
-        }
-        return out.toString();
-    }
-
-    String runNewJavap(String[] args) {
-        String[] nArgs = new String[args.length + 2];
-        nArgs[0] = "-XDcompat";
-        nArgs[1] = "-XDignore.symbol.file";
-        System.arraycopy(args, 0, nArgs, 2, args.length);
-        //System.err.println("NEW: " + Arrays.asList(nArgs));
-        StringWriter out = new StringWriter();
-        com.sun.tools.javap.Main.run(nArgs, new PrintWriter(out, true));
-        return out.toString();
-    }
-
-    File write(String text, String suffix) throws IOException {
-        File f = File.createTempFile("OptionTest", suffix);
-        FileWriter out = new FileWriter(f);
-        out.write(text);
-        out.close();
-        return f;
-    }
-
-    void view(String oldOut, String newOut) throws Exception {
-        File oldFile = write(oldOut, "old");
-        File newFile = write(newOut, "new");
-        List<String> cmd = new ArrayList<String>();
-        cmd.addAll(viewCmd);
-        cmd.add(oldFile.getPath());
-        cmd.add(newFile.getPath());
-        Process p = new ProcessBuilder(cmd).redirectErrorStream(true).start();
-        p.getOutputStream().close();
-        String line;
-        BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
-        while ((line = in.readLine()) != null)
-            System.err.println(line);
-        in.close();
-        p.waitFor();
-    }
-
-    String testClassName = "java.lang.SecurityManager";
-    boolean viewResults;
-    List<String> viewCmd;
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javap/T6824493.java	Thu Jun 11 21:35:12 2009 -0700
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import java.io.*;
+import java.util.*;
+
+/*
+ * @test
+ * @bug 6824493
+ * @summary experimental support for additional info for instructions
+ * @compile -g T6824493.java
+ * @run main T6824493
+ */
+public class T6824493 {
+    public static void main(String... args) {
+        new T6824493().run();
+    }
+
+    void run() {
+        // for each of the options, we run javap and check for some
+        // marker strings in the output that generally indicate the
+        // presence of the expected output, without being as specific
+        // as a full golden file test.
+        test("-XDdetails:source",
+            "for (int i = 0; i < 10; i++) {",
+            "System.out.println(s + i);");
+
+        test("-XDdetails:tryBlocks",
+                "try[0]",
+                "end try[0]",
+                "catch[0]");
+
+        test("-XDdetails:stackMaps",
+                "StackMap locals:  this java/lang/String int",
+                "StackMap stack:  java/lang/Throwable");
+
+        test("-XDdetails:localVariables",
+                "start local 3 // java.util.List list",
+                "end local 3 // java.util.List list");
+
+        test("-XDdetails:localVariableTypes",
+                "start generic local 3 // java.util.List<java.lang.String> list",
+                "end generic local 3 // java.util.List<java.lang.String> list");
+
+        if (errors > 0)
+            throw new Error(errors + " errors found");
+    }
+
+    void test(String option, String... expect) {
+        String[] args = {
+            "-c",
+            "-classpath",
+            testSrc + File.pathSeparator + testClasses,
+            option,
+            "Test"
+        };
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        int rc = com.sun.tools.javap.Main.run(args, pw);
+        if (rc != 0) {
+            error("unexpected return code from javap: " + rc);
+            return;
+        }
+
+        String out = sw.toString();
+        System.out.println(out);
+        for (String e: expect) {
+            if (!out.contains(e))
+                error("Not found: " + e);
+        }
+    }
+
+    void error(String msg) {
+        System.err.println("Error: " + msg);
+        errors++;
+    }
+
+    private int errors;
+    private String testSrc = System.getProperty("test.src", ".");
+    private String testClasses = System.getProperty("test.classes", ".");
+}
+
+class Test {
+    void m(String s) {
+        for (int i = 0; i < 10; i++) {
+            try {
+                List<String> list = null;
+                System.out.println(s + i);
+            } catch (NullPointerException e) {
+                System.out.println("catch NPE");
+            } finally {
+                System.out.println("finally");
+            }
+        }
+    }
+}