This commit is contained in:
Lana Steuck 2014-07-30 11:49:49 -07:00
commit d4ac511615
126 changed files with 1660 additions and 855 deletions
langtools
make
src/share
test

@ -799,9 +799,15 @@
<target name="idea">
<mkdir dir=".idea"/>
<copy todir=".idea" >
<fileset dir="make/intellij" includes="**"/>
<fileset dir="make/intellij" excludes="**/src/**"/>
</copy>
<replace file=".idea/ant.xml" token="@@@" value="${jtreg.home}"/>
<condition property="jtreg.idea.home" value="${jtreg.home}" else = "[jtreg.home]">
<isset property="jtreg.home"/>
</condition>
<replace file=".idea/ant.xml" token="@@@" value="${jtreg.idea.home}"/>
<mkdir dir=".idea/classes"/>
<javac srcdir="make/intellij/src"
destdir=".idea/classes"/>
</target>
<!--

@ -10,7 +10,7 @@
<property name="javac.debuglevel" value="source,lines,vars" />
<property name="jtreg.jpda.jvmargs" value="-agentlib:jdwp=transport=dt_socket,server=n,address=localhost:5900,suspend=y" />
</properties>
<executeOn event="afterCompilation" target="build-all-classes" />
<executeOn event="afterCompilation" target="post-make" />
</buildFile>
</component>
</project>

@ -1,18 +1,15 @@
<!-- importing.xml -->
<project name="langtools" basedir="..">
<script language="javascript" classpath=".idea/classes">
var ideaListener = project.getBuildListeners().firstElement();
var LangtoolsLogger = Java.type("idea.LangtoolsIdeaAntLogger");
project.removeBuildListener(ideaListener)
project.addBuildListener(new LangtoolsLogger(ideaListener))
</script>
<import file="../make/build.xml"/>
<target name="jtreg-debug" depends="build-all-tools,-def-jtreg">
<exec-target target="jtreg-debug-internal"/>
</target>
<target name="jtreg-debug-internal" depends="build-all-tools,-def-jtreg">
<sequential>
<sleep seconds="2"/>
<jtreg-tool name="all" tests="${jtreg.tests}" jpda.jvmargs="${jtreg.jpda.jvmargs}"/>
</sequential>
</target>
<macrodef name="exec-target">
<attribute name="antfile" default="${ant.file}" />
<attribute name="target" />
@ -32,5 +29,15 @@
</java>
</sequential>
</macrodef>
<target name="post-make" depends="build-all-tools"/>
<target name="jtreg-debug" depends="build-all-tools,-def-jtreg">
<exec-target target="jtreg-debug-internal"/>
</target>
<target name="jtreg-debug-internal" depends="-def-jtreg">
<jtreg-tool name="all" tests="${jtreg.tests}" jpda.jvmargs="${jtreg.jpda.jvmargs}"/>
</target>
</project>

@ -5,10 +5,14 @@
<value>
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="RIGHT_MARGIN" value="80" />
<option name="RIGHT_MARGIN" value="100" />
<option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" />
<XML>
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
<codeStyleSettings language="JAVA">
<option name="SPACE_AFTER_TYPE_CAST" value="false" />
</codeStyleSettings>
</value>
</option>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />

@ -3,28 +3,16 @@
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<excludeFromCompile>
<directory url="file://$PROJECT_DIR$/src" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/test" includeSubdirectories="true" />
</excludeFromCompile>
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
</wildcardResourcePatterns>
<wildcardResourcePatterns />
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
<component name="JavacSettings">
<option name="DEBUGGING_INFO" value="false" />
<option name="ADDITIONAL_OPTIONS_STRING" value="-Xlint:all -Werror" />
</component>
</component>
</project>

@ -0,0 +1,9 @@
<component name="CopyrightManager">
<copyright>
<option name="notice" value="Copyright (c) &amp;#36;today.year, Oracle and/or its affiliates. All rights reserved.&#10;DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.&#10;&#10;This code is free software; you can redistribute it and/or modify it&#10;under the terms of the GNU General Public License version 2 only, as&#10;published by the Free Software Foundation. Oracle designates this&#10;particular file as subject to the &quot;Classpath&quot; exception as provided&#10;by Oracle in the LICENSE file that accompanied this code.&#10;&#10;This code is distributed in the hope that it will be useful, but WITHOUT&#10;ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or&#10;FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License&#10;version 2 for more details (a copy is included in the LICENSE file that&#10;accompanied this code).&#10;&#10;You should have received a copy of the GNU General Public License version&#10;2 along with this work; if not, write to the Free Software Foundation,&#10;Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.&#10;&#10;Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA&#10;or visit www.oracle.com if you need additional information or have any&#10;questions." />
<option name="keyword" value="Copyright" />
<option name="allowReplaceKeyword" value="" />
<option name="myName" value="langtools" />
<option name="myLocal" value="true" />
</copyright>
</component>

@ -0,0 +1,3 @@
<component name="CopyrightManager">
<settings default="langtools" />
</component>

@ -14,6 +14,10 @@
<value />
</option>
</inspection_tool>
<inspection_tool class="RawUseOfParameterizedType" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoreObjectConstruction" value="false" />
<option name="ignoreUncompilable" value="true" />
</inspection_tool>
<inspection_tool class="SpellCheckingInspection" enabled="true" level="TYPO" enabled_by_default="true">
<option name="processCode" value="false" />
<option name="processLiterals" value="false" />

@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build" />
<output-test url="file://$MODULE_DIR$/build" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/gensrc" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/bootstrap/gensrc" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/genstubs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/share/classes" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/test" type="java-test-resource" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="inheritedJdk" />

@ -4,7 +4,7 @@
<entry_points version="2.0" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" assert-keyword="true" jdk-15="true">
<output url="file://$PROJECT_DIR$/build/intellij" />
<output url="file://$PROJECT_DIR$/build" />
</component>
</project>

@ -0,0 +1,355 @@
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package idea;
import org.apache.tools.ant.BuildEvent;
import org.apache.tools.ant.DefaultLogger;
import java.util.EnumSet;
import java.util.Stack;
import static org.apache.tools.ant.Project.*;
/**
* This class is used to wrap the IntelliJ ant logger in order to provide more meaningful
* output when building langtools. The basic ant output in IntelliJ can be quite cumbersome to
* work with, as it provides two separate views: (i) a tree view, which is good to display build task
* in a hierarchical fashion as they are processed; and a (ii) plain text view, which gives you
* the full ant output. The main problem is that javac-related messages are buried into the
* ant output (which is made very verbose by IntelliJ in order to support the tree view). It is
* not easy to figure out which node to expand in order to see the error message; switching
* to plain text doesn't help either, as now the output is totally flat.
*
* This logger class removes a lot of verbosity from the IntelliJ ant logger by not propagating
* all the events to the IntelliJ's logger. In addition, certain events are handled in a custom
* fashion, to generate better output during the build.
*/
public final class LangtoolsIdeaAntLogger extends DefaultLogger {
/**
* This is just a way to pass in customized binary string predicates;
*
* TODO: replace with @code{BiPredicate<String, String>} and method reference when moving to 8
*/
enum StringBinaryPredicate {
CONTAINS() {
@Override
boolean apply(String s1, String s2) {
return s1.contains(s2);
}
},
STARTS_WITH {
@Override
boolean apply(String s1, String s2) {
return s1.startsWith(s2);
}
};
abstract boolean apply(String s1, String s2);
}
/**
* Various kinds of ant messages that we shall intercept
*/
enum MessageKind {
/** a javac error */
JAVAC_ERROR(StringBinaryPredicate.CONTAINS, MSG_ERR, "error:", "compiler.err"),
/** a javac warning */
JAVAC_WARNING(StringBinaryPredicate.CONTAINS, MSG_WARN, "warning:", "compiler.warn"),
/** a javac note */
JAVAC_NOTE(StringBinaryPredicate.CONTAINS, MSG_INFO, "note:", "compiler.note"),
/** continuation of some javac error message */
JAVAC_NESTED_DIAG(StringBinaryPredicate.STARTS_WITH, MSG_INFO, " "),
/** a javac crash */
JAVAC_CRASH(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "An exception has occurred in the compiler"),
/** jtreg test success */
JTREG_TEST_PASSED(StringBinaryPredicate.STARTS_WITH, MSG_INFO, "Passed: "),
/** jtreg test failure */
JTREG_TEST_FAILED(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "FAILED: "),
/** jtreg test error */
JTREG_TEST_ERROR(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "Error: ");
StringBinaryPredicate sbp;
int priority;
String[] keys;
MessageKind(StringBinaryPredicate sbp, int priority, String... keys) {
this.sbp = sbp;
this.priority = priority;
this.keys = keys;
}
/**
* Does a given message string matches this kind?
*/
boolean matches(String s) {
for (String key : keys) {
if (sbp.apply(s, key)) {
return true;
}
}
return false;
}
}
/**
* This enum is used to represent the list of tasks we need to keep track of during logging.
*/
enum Task {
/** javac task - invoked during compilation */
JAVAC("javac", MessageKind.JAVAC_ERROR, MessageKind.JAVAC_WARNING, MessageKind.JAVAC_NOTE,
MessageKind.JAVAC_NESTED_DIAG, MessageKind.JAVAC_CRASH),
/** jtreg task - invoked during test execution */
JTREG("jtreg", MessageKind.JTREG_TEST_PASSED, MessageKind.JTREG_TEST_FAILED, MessageKind.JTREG_TEST_ERROR),
/** initial synthetic task when the logger is created */
ROOT("") {
@Override
boolean matches(String s) {
return false;
}
},
/** synthetic task catching any other tasks not in this list */
ANY("") {
@Override
boolean matches(String s) {
return true;
}
};
String taskName;
MessageKind[] msgs;
Task(String taskName, MessageKind... msgs) {
this.taskName = taskName;
this.msgs = msgs;
}
boolean matches(String s) {
return s.equals(taskName);
}
}
/**
* This enum is used to represent the list of targets we need to keep track of during logging.
* A regular expression is used to match a given target name.
*/
enum Target {
/** jtreg target - executed when launching tests */
JTREG("jtreg") {
@Override
String getDisplayMessage(BuildEvent e) {
return "Running jtreg tests: " + e.getProject().getProperty("jtreg.tests");
}
},
/** build bootstrap tool target - executed when bootstrapping javac */
BUILD_BOOTSTRAP_TOOL("build-bootstrap-.*") {
@Override
String getDisplayMessage(BuildEvent e) {
String targetName = e.getTarget().getName();
String tool = targetName.split("-")[2];
return "Building bootstrap " + tool + "...";
}
},
/** build classes target - executed when building classes of given tool */
BUILD_TOOL("build-classes-.*") {
@Override
String getDisplayMessage(BuildEvent e) {
String targetName = e.getTarget().getName();
String tool = targetName.split("-")[2];
return "Building " + tool + "...";
}
},
/** synthetic target catching any other target not in this list */
ANY("") {
@Override
String getDisplayMessage(BuildEvent e) {
return "Executing Ant target(s): " + e.getProject().getProperty("ant.project.invoked-targets");
}
@Override
boolean matches(String msg) {
return true;
}
};
String targetRegex;
Target(String targetRegex) {
this.targetRegex = targetRegex;
}
boolean matches(String msg) {
return msg.matches(targetRegex);
}
abstract String getDisplayMessage(BuildEvent e);
}
/**
* A custom build event used to represent status changes which should be notified inside
* Intellij
*/
static class StatusEvent extends BuildEvent {
/** the target to which the status update refers */
Target target;
StatusEvent(BuildEvent e, Target target) {
super(new StatusTask(e, target.getDisplayMessage(e)));
this.target = target;
setMessage(getTask().getTaskName(), 2);
}
/**
* A custom task used to channel info regarding a status change
*/
static class StatusTask extends org.apache.tools.ant.Task {
StatusTask(BuildEvent event, String msg) {
setProject(event.getProject());
setOwningTarget(event.getTarget());
setTaskName(msg);
}
}
}
/** wrapped ant logger (IntelliJ's own logger) */
DefaultLogger logger;
/** flag - is this the first target we encounter? */
boolean firstTarget = true;
/** flag - should subsequenet failures be suppressed ? */
boolean suppressTaskFailures = false;
/** flag - have we ran into a javac crash ? */
boolean crashFound = false;
/** stack of status changes associated with pending targets */
Stack<StatusEvent> statusEvents = new Stack<>();
/** stack of pending tasks */
Stack<Task> tasks = new Stack<>();
public LangtoolsIdeaAntLogger(DefaultLogger logger) {
this.logger = logger;
tasks.push(Task.ROOT);
}
@Override
public void buildStarted(BuildEvent event) {
//do nothing
}
@Override
public void buildFinished(BuildEvent event) {
//do nothing
}
@Override
public void targetStarted(BuildEvent event) {
EnumSet<Target> statusKinds = firstTarget ?
EnumSet.allOf(Target.class) :
EnumSet.complementOf(EnumSet.of(Target.ANY));
String targetName = event.getTarget().getName();
for (Target statusKind : statusKinds) {
if (statusKind.matches(targetName)) {
StatusEvent statusEvent = new StatusEvent(event, statusKind);
statusEvents.push(statusEvent);
logger.taskStarted(statusEvent);
firstTarget = false;
return;
}
}
}
@Override
public void targetFinished(BuildEvent event) {
if (!statusEvents.isEmpty()) {
StatusEvent lastEvent = statusEvents.pop();
if (lastEvent.target.matches(event.getTarget().getName())) {
logger.taskFinished(lastEvent);
}
}
}
@Override
public void taskStarted(BuildEvent event) {
String taskName = event.getTask().getTaskName();
for (Task task : Task.values()) {
if (task.matches(taskName)) {
tasks.push(task);
return;
}
}
}
@Override
public void taskFinished(BuildEvent event) {
if (tasks.peek() == Task.ROOT) {
//we need to 'close' the root task to get nicer output
logger.taskFinished(event);
} else if (!suppressTaskFailures && event.getException() != null) {
//the first (innermost) task failure should always be logged
event.setMessage(event.getException().toString(), 0);
event.setException(null);
//note: we turn this into a plain message to avoid stack trace being logged by Idea
logger.messageLogged(event);
suppressTaskFailures = true;
}
tasks.pop();
}
@Override
public void messageLogged(BuildEvent event) {
String msg = event.getMessage();
boolean processed = false;
if (!tasks.isEmpty()) {
Task task = tasks.peek();
for (MessageKind messageKind : task.msgs) {
if (messageKind.matches(msg)) {
event.setMessage(msg, messageKind.priority);
processed = true;
if (messageKind == MessageKind.JAVAC_CRASH) {
crashFound = true;
}
break;
}
}
}
if (event.getPriority() == MSG_ERR || crashFound) {
//we log errors regardless of owning task
logger.messageLogged(event);
suppressTaskFailures = true;
} else if (processed) {
logger.messageLogged(event);
}
}
}

@ -7,6 +7,7 @@
<option name="MAKE_PROJECT_ON_SAVE" value="true" />
</component>
<component name="RunManager" selected="Application.javac">
<!-- standard tools -->
<configuration default="false" name="javac" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="com.sun.tools.javac.Main" />
<option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/classes" />
@ -19,7 +20,12 @@
<option name="PASS_PARENT_ENVS" value="true" />
<module name="langtools" />
<envs />
<method />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Run" />
<method>
<option name="Make" enabled="false" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-javac" />
</method>
</configuration>
<configuration default="false" name="javadoc" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="com.sun.tools.javadoc.Main" />
@ -33,7 +39,12 @@
<option name="PASS_PARENT_ENVS" value="true" />
<module name="langtools" />
<envs />
<method />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Run" />
<method>
<option name="Make" enabled="false" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-javadoc" />
</method>
</configuration>
<configuration default="false" name="javap" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="com.sun.tools.javap.Main" />
@ -47,7 +58,12 @@
<option name="PASS_PARENT_ENVS" value="true" />
<module name="langtools" />
<envs />
<method />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Run" />
<method>
<option name="Make" enabled="false" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-javap" />
</method>
</configuration>
<configuration default="false" name="javah" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="com.sun.tools.javah.Main" />
@ -61,21 +77,12 @@
<option name="PASS_PARENT_ENVS" value="true" />
<module name="langtools" />
<envs />
<method />
</configuration>
<configuration default="false" name="jdeps" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="com.sun.tools.jdeps.Main" />
<option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/classes" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="langtools" />
<envs />
<method />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Run" />
<method>
<option name="Make" enabled="false" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-javah" />
</method>
</configuration>
<configuration default="false" name="sjavac" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="com.sun.tools.sjavac.Main" />
@ -89,9 +96,35 @@
<option name="PASS_PARENT_ENVS" value="true" />
<module name="langtools" />
<envs />
<method />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Run" />
<method>
<option name="Make" enabled="false" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-sjavac" />
</method>
</configuration>
<configuration default="false" name="jtreg (remote)" type="Remote" factoryName="Remote" singleton="true">
<!-- bootstrap javac -->
<configuration default="false" name="javac (bootstrap)" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="com.sun.tools.javac.Main" />
<option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/bootstrap/classes" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="langtools" />
<envs />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Run" />
<method>
<option name="Make" enabled="false" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-bootstrap-javac" />
</method>
</configuration>
<!-- jtreg debug -->
<configuration default="false" name="jtreg (debug)" type="Remote" factoryName="Remote" singleton="true">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="true" />
<option name="SHMEM_ADDRESS" />
@ -108,15 +141,6 @@
</method>
<method />
</configuration>
<list size="7">
<item index="0" class="java.lang.String" itemvalue="Application.javac" />
<item index="1" class="java.lang.String" itemvalue="Application.javadoc" />
<item index="2" class="java.lang.String" itemvalue="Application.javap" />
<item index="3" class="java.lang.String" itemvalue="Application.javah" />
<item index="4" class="java.lang.String" itemvalue="Application.jdeps" />
<item index="5" class="java.lang.String" itemvalue="Application.sjavac" />
<item index="6" class="java.lang.String" itemvalue="Remote.jtreg" />
</list>
</component>
<component name="antWorkspaceConfiguration">
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
@ -131,8 +155,9 @@
<filter targetName="jtreg-debug" isVisible="true" />
<filter targetName="checkstyle" isVisible="true" />
</targetFilters>
<viewClosedWhenNoErrors value="false" />
<viewClosedWhenNoErrors value="true" />
<expanded value="false" />
<treeView value="false" />
</buildFile>
</component>
</project>

@ -749,7 +749,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
* Leave class public for external testing purposes.
*/
public static class ComputeAnnotationSet extends
ElementScanner8<Set<TypeElement>, Set<TypeElement>> {
ElementScanner9<Set<TypeElement>, Set<TypeElement>> {
final Elements elements;
public ComputeAnnotationSet(Elements elements) {

@ -114,7 +114,7 @@ public class JavacRoundEnvironment implements RoundEnvironment {
if (a.getKind() != ElementKind.ANNOTATION_TYPE)
throw new IllegalArgumentException(NOT_AN_ANNOTATION_TYPE + a);
ElementScanner8<Set<Element>, TypeElement> scanner =
ElementScanner9<Set<Element>, TypeElement> scanner =
new AnnotationSetScanner(result);
for (Element element : rootElements)
@ -125,7 +125,7 @@ public class JavacRoundEnvironment implements RoundEnvironment {
// Could be written as a local class inside getElementsAnnotatedWith
private class AnnotationSetScanner extends
ElementScanner8<Set<Element>, TypeElement> {
ElementScanner9<Set<Element>, TypeElement> {
// Insertion-order preserving set
Set<Element> annotatedElements = new LinkedHashSet<>();

@ -83,7 +83,7 @@ public class PrintingProcessor extends AbstractProcessor {
* Used for the -Xprint option and called by Elements.printElements
*/
public static class PrintingElementVisitor
extends SimpleElementVisitor8<PrintingElementVisitor, Boolean> {
extends SimpleElementVisitor9<PrintingElementVisitor, Boolean> {
int indentation; // Indentation level;
final PrintWriter writer;
final Elements elementUtils;

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -60,7 +60,7 @@ import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.TypeMirror;
import javax.lang.model.type.TypeVisitor;
import javax.lang.model.util.ElementFilter;
import javax.lang.model.util.SimpleTypeVisitor8;
import javax.lang.model.util.SimpleTypeVisitor9;
import javax.lang.model.util.Types;
import javax.tools.Diagnostic;
@ -738,7 +738,7 @@ public class JavahTask implements NativeHeaderTool.NativeHeaderTask {
}
private TypeVisitor<Void,Types> checkMethodParametersVisitor =
new SimpleTypeVisitor8<Void,Types>() {
new SimpleTypeVisitor9<Void,Types>() {
@Override
public Void visitArray(ArrayType t, Types types) {
visit(t.getComponentType(), types);

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -45,7 +45,7 @@ import javax.lang.model.type.TypeKind;
import javax.lang.model.type.TypeMirror;
import javax.lang.model.type.TypeVisitor;
import javax.lang.model.util.ElementFilter;
import javax.lang.model.util.SimpleTypeVisitor8;
import javax.lang.model.util.SimpleTypeVisitor9;
/*
* <p><b>This is NOT part of any supported API.
@ -628,7 +628,7 @@ public class LLNI extends Gen {
}
protected final boolean isLongOrDouble(TypeMirror t) {
TypeVisitor<Boolean,Void> v = new SimpleTypeVisitor8<Boolean,Void>() {
TypeVisitor<Boolean,Void> v = new SimpleTypeVisitor9<Boolean,Void>() {
public Boolean defaultAction(TypeMirror t, Void p){
return false;
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -38,7 +38,7 @@ import javax.lang.model.type.TypeMirror;
import javax.lang.model.type.TypeVariable;
import javax.lang.model.type.TypeVisitor;
import javax.lang.model.util.Elements;
import javax.lang.model.util.SimpleTypeVisitor8;
import javax.lang.model.util.SimpleTypeVisitor9;
/**
* Returns internal type signature.
@ -248,7 +248,7 @@ public class TypeSignature {
String qualifiedTypeName(TypeMirror type) {
TypeVisitor<Name, Void> v = new SimpleTypeVisitor8<Name, Void>() {
TypeVisitor<Name, Void> v = new SimpleTypeVisitor9<Name, Void>() {
@Override
public Name visitArray(ArrayType t, Void p) {
return t.getComponentType().accept(this, p);

@ -24,8 +24,6 @@
*/
package com.sun.tools.jdeps;
import com.sun.tools.classfile.Dependency.Location;
import com.sun.tools.jdeps.PlatformClassPath.JDKArchive;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
@ -33,6 +31,10 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
import com.sun.tools.classfile.Dependency.Location;
import com.sun.tools.jdeps.PlatformClassPath.JDKArchive;
/**
* Dependency Analyzer.
@ -110,6 +112,13 @@ public class Analyzer {
return false;
}
public Set<String> dependences(Archive source) {
ArchiveDeps result = results.get(source);
return result.dependencies().stream()
.map(Dep::target)
.collect(Collectors.toSet());
}
public interface Visitor {
/**
* Visits a recorded dependency from origin to target which can be

@ -236,6 +236,11 @@ class JdepsTask {
task.options.showLabel = true;
}
},
new HiddenOption(false, "-q", "-quiet") {
void process(JdepsTask task, String opt, String arg) {
task.options.nowarning = true;
}
},
new HiddenOption(true, "-depth") {
void process(JdepsTask task, String opt, String arg) throws BadArgs {
try {
@ -320,7 +325,9 @@ class JdepsTask {
Analyzer analyzer = new Analyzer(options.verbose, new Analyzer.Filter() {
@Override
public boolean accepts(Location origin, Archive originArchive, Location target, Archive targetArchive) {
public boolean accepts(Location origin, Archive originArchive,
Location target, Archive targetArchive)
{
if (options.findJDKInternals) {
// accepts target that is JDK class but not exported
return isJDKArchive(targetArchive) &&
@ -344,6 +351,10 @@ class JdepsTask {
} else {
printRawOutput(log, analyzer);
}
if (options.findJDKInternals && !options.nowarning) {
showReplacements(analyzer);
}
return true;
}
@ -693,6 +704,7 @@ class JdepsTask {
boolean apiOnly;
boolean showLabel;
boolean findJDKInternals;
boolean nowarning;
// default is to show package-level dependencies
// and filter references from same package
Analyzer.Type verbose = PACKAGE;
@ -709,6 +721,7 @@ class JdepsTask {
private static class ResourceBundleHelper {
static final ResourceBundle versionRB;
static final ResourceBundle bundle;
static final ResourceBundle jdkinternals;
static {
Locale locale = Locale.getDefault();
@ -722,6 +735,11 @@ class JdepsTask {
} catch (MissingResourceException e) {
throw new InternalError("version.resource.missing");
}
try {
jdkinternals = ResourceBundle.getBundle("com.sun.tools.jdeps.resources.jdkinternals");
} catch (MissingResourceException e) {
throw new InternalError("Cannot find jdkinternals resource bundle");
}
}
}
@ -928,4 +946,50 @@ class JdepsTask {
}
return Profile.getProfile(pn);
}
/**
* Returns the recommended replacement API for the given classname;
* or return null if replacement API is not known.
*/
private String replacementFor(String cn) {
String name = cn;
String value = null;
while (value == null && name != null) {
try {
value = ResourceBundleHelper.jdkinternals.getString(name);
} catch (MissingResourceException e) {
// go up one subpackage level
int i = name.lastIndexOf('.');
name = i > 0 ? name.substring(0, i) : null;
}
}
return value;
};
private void showReplacements(Analyzer analyzer) {
Map<String,String> jdkinternals = new TreeMap<>();
boolean useInternals = false;
for (Archive source : sourceLocations) {
useInternals = useInternals || analyzer.hasDependences(source);
for (String cn : analyzer.dependences(source)) {
String repl = replacementFor(cn);
if (repl != null) {
jdkinternals.putIfAbsent(cn, repl);
}
}
}
if (useInternals) {
log.println();
warning("warn.replace.useJDKInternals", getMessage("jdeps.wiki.url"));
}
if (!jdkinternals.isEmpty()) {
log.println();
log.format("%-40s %s%n", "JDK Internal API", "Suggested Replacement");
log.format("%-40s %s%n", "----------------", "---------------------");
for (Map.Entry<String,String> e : jdkinternals.entrySet()) {
log.format("%-40s %s%n", e.getKey(), e.getValue());
}
}
}
}

@ -93,5 +93,12 @@ err.profiles.msg=No profile information
err.invalid.path=invalid path: {0}
warn.invalid.arg=Invalid classname or pathname not exist: {0}
warn.split.package=package {0} defined in {1} {2}
warn.replace.useJDKInternals=\
JDK internal APIs are unsupported and private to JDK implementation that are\n\
subject to be removed or changed incompatibly and could break your application.\n\
Please modify your code to eliminate dependency on any JDK internal APIs.\n\
For the most recent update on JDK internal API replacements, please check:\n\
{0}
artifact.not.found=not found
jdeps.wiki.url=https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool

@ -0,0 +1,22 @@
// No translation needed
com.sun.crypto.provider.SunJCE=Use java.security.Security.getProvider(provider-name) @since 1.3
com.sun.image.codec=Use javax.imageio @since 1.4
com.sun.org.apache.xml.internal.security=Use java.xml.crypto @since 1.6
com.sun.org.apache.xml.internal.security.utils.Base64=Use java.util.Base64 @since 1.8
com.sun.net.ssl=Use javax.net.ssl @since 1.4
com.sun.net.ssl.internal.ssl.Provider=Use java.security.Security.getProvider(provider-name) @since 1.3
com.sun.rowset=Use javax.sql.rowset.RowSetProvider @since 1.7
com.sun.tools.javac.tree=Use com.sun.source @since 1.6
com.sun.tools.javac=Use javax.tools and javax.lang.model @since 1.6
sun.awt.image.codec=Use javax.imageio @since 1.4
sun.misc.BASE64Encoder=Use java.util.Base64 @since 1.8
sun.misc.BASE64Decoder=Use java.util.Base64 @since 1.8
sun.misc.Cleaner=Use java.lang.ref.PhantomReference @since 1.2
sun.misc.Service=Use java.util.ServiceLoader @since 1.6
sun.security.action=Use java.security.PrivilegedAction @since 1.1
sun.security.krb5=Use com.sun.security.jgss
sun.security.provider.PolicyFile=Use java.security.Policy.getInstance("JavaPolicy", new URIParameter(uri)) @since 1.6
sun.security.provider.Sun=Use java.security.Security.getProvider(provider-name) @since 1.3
sun.security.util.SecurityConstants=Use appropriate java.security.Permission subclass @since 1.1
sun.security.x509.X500Name=Use javax.security.auth.x500.X500Principal @since 1.4
sun.tools.jar=Use java.util.jar or jar tool @since 1.2

@ -32,7 +32,7 @@ import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.VariableElement;
import javax.lang.model.type.TypeMirror;
import javax.lang.model.util.ElementScanner6;
import javax.lang.model.util.ElementScanner9;
/** Utility class that constructs a textual representation
* of the public api of a class.
@ -42,7 +42,7 @@ import javax.lang.model.util.ElementScanner6;
* risk. This code and its internal interfaces are subject to change
* or deletion without notice.</b></p>
*/
public class PubapiVisitor extends ElementScanner6<Void, Void> {
public class PubapiVisitor extends ElementScanner9<Void, Void> {
StringBuffer sb;
// Important that it is 1! Part of protocol over wire, silly yes.

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -73,8 +73,6 @@ import javax.lang.model.util.*;
* @author Joseph D. Darcy
* @author Scott Seligman
* @author Peter von der Ah&eacute;
* @see AbstractElementVisitor6
* @see AbstractElementVisitor7
* @since 1.6
*/
public interface ElementVisitor<R, P> {

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -72,8 +72,12 @@ import javax.annotation.processing.SupportedSourceVersion;
*
* @see AbstractAnnotationValueVisitor7
* @see AbstractAnnotationValueVisitor8
* @see AbstractAnnotationValueVisitor9
* @since 1.6
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@SupportedSourceVersion(RELEASE_6)
public abstract class AbstractAnnotationValueVisitor6<R, P>
implements AnnotationValueVisitor<R, P> {

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -65,8 +65,10 @@ import javax.annotation.processing.SupportedSourceVersion;
*
* @see AbstractAnnotationValueVisitor6
* @see AbstractAnnotationValueVisitor8
* @see AbstractAnnotationValueVisitor9
* @since 1.7
*/
@SuppressWarnings("deprecation") // Superclass deprecated
@SupportedSourceVersion(RELEASE_7)
public abstract class AbstractAnnotationValueVisitor7<R, P> extends AbstractAnnotationValueVisitor6<R, P> {

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -65,6 +65,7 @@ import javax.annotation.processing.SupportedSourceVersion;
*
* @see AbstractAnnotationValueVisitor6
* @see AbstractAnnotationValueVisitor7
* @see AbstractAnnotationValueVisitor9
* @since 1.8
*/
@SupportedSourceVersion(RELEASE_8)

@ -0,0 +1,71 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.lang.model.util;
import static javax.lang.model.SourceVersion.*;
import javax.lang.model.SourceVersion;
import javax.annotation.processing.SupportedSourceVersion;
/**
* A skeletal visitor for annotation values with default behavior
* appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9}
* source version.
*
* <p> <b>WARNING:</b> The {@code AnnotationValueVisitor} interface
* implemented by this class may have methods added to it in the
* future to accommodate new, currently unknown, language structures
* added to future versions of the Java&trade; programming language.
* Therefore, methods whose names begin with {@code "visit"} may be
* added to this class in the future; to avoid incompatibilities,
* classes which extend this class should not declare any instance
* methods with names beginning with {@code "visit"}.
*
* <p>When such a new visit method is added, the default
* implementation in this class will be to call the {@link
* #visitUnknown visitUnknown} method. A new abstract annotation
* value visitor class will also be introduced to correspond to the
* new language level; this visitor will have different default
* behavior for the visit method in question. When the new visitor is
* introduced, all or portions of this visitor may be deprecated.
*
* @param <R> the return type of this visitor's methods
* @param <P> the type of the additional parameter to this visitor's methods.
*
* @see AbstractAnnotationValueVisitor6
* @see AbstractAnnotationValueVisitor7
* @see AbstractAnnotationValueVisitor8
* @since 1.9
*/
@SupportedSourceVersion(RELEASE_9)
public abstract class AbstractAnnotationValueVisitor9<R, P> extends AbstractAnnotationValueVisitor8<R, P> {
/**
* Constructor for concrete subclasses to call.
*/
protected AbstractAnnotationValueVisitor9() {
super();
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -74,8 +74,12 @@ import static javax.lang.model.SourceVersion.*;
*
* @see AbstractElementVisitor7
* @see AbstractElementVisitor8
* @see AbstractElementVisitor9
* @since 1.6
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@SupportedSourceVersion(RELEASE_6)
public abstract class AbstractElementVisitor6<R, P> implements ElementVisitor<R, P> {
/**

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -69,8 +69,10 @@ import static javax.lang.model.SourceVersion.*;
*
* @see AbstractElementVisitor6
* @see AbstractElementVisitor8
* @see AbstractElementVisitor9
* @since 1.7
*/
@SuppressWarnings("deprecation") // Superclass deprecated
@SupportedSourceVersion(RELEASE_7)
public abstract class AbstractElementVisitor7<R, P> extends AbstractElementVisitor6<R, P> {
/**

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -69,6 +69,7 @@ import static javax.lang.model.SourceVersion.*;
*
* @see AbstractElementVisitor6
* @see AbstractElementVisitor7
* @see AbstractElementVisitor9
* @since 1.8
*/
@SupportedSourceVersion(RELEASE_8)

@ -0,0 +1,74 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.lang.model.util;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import static javax.lang.model.SourceVersion.*;
/**
* A skeletal visitor of program elements with default behavior
* appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9}
* source version.
*
* <p> <b>WARNING:</b> The {@code ElementVisitor} interface
* implemented by this class may have methods added to it in the
* future to accommodate new, currently unknown, language structures
* added to future versions of the Java&trade; programming language.
* Therefore, methods whose names begin with {@code "visit"} may be
* added to this class in the future; to avoid incompatibilities,
* classes which extend this class should not declare any instance
* methods with names beginning with {@code "visit"}.
*
* <p>When such a new visit method is added, the default
* implementation in this class will be to call the {@link
* #visitUnknown visitUnknown} method. A new abstract element visitor
* class will also be introduced to correspond to the new language
* level; this visitor will have different default behavior for the
* visit method in question. When the new visitor is introduced, all
* or portions of this visitor may be deprecated.
*
* @param <R> the return type of this visitor's methods. Use {@link
* Void} for visitors that do not need to return results.
* @param <P> the type of the additional parameter to this visitor's
* methods. Use {@code Void} for visitors that do not need an
* additional parameter.
*
* @see AbstractElementVisitor6
* @see AbstractElementVisitor7
* @see AbstractElementVisitor8
* @since 1.9
*/
@SupportedSourceVersion(RELEASE_9)
public abstract class AbstractElementVisitor9<R, P> extends AbstractElementVisitor8<R, P> {
/**
* Constructor for concrete subclasses to call.
*/
protected AbstractElementVisitor9(){
super();
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,8 +25,11 @@
package javax.lang.model.util;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.type.*;
import static javax.lang.model.SourceVersion.*;
/**
* A skeletal visitor of types with default behavior appropriate for
* the {@link javax.lang.model.SourceVersion#RELEASE_6 RELEASE_6}
@ -70,8 +73,13 @@ import javax.lang.model.type.*;
*
* @see AbstractTypeVisitor7
* @see AbstractTypeVisitor8
* @see AbstractTypeVisitor9
* @since 1.6
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@SupportedSourceVersion(RELEASE_6)
public abstract class AbstractTypeVisitor6<R, P> implements TypeVisitor<R, P> {
/**
* Constructor for concrete subclasses to call.

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,8 +25,11 @@
package javax.lang.model.util;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.type.*;
import static javax.lang.model.SourceVersion.*;
/**
* A skeletal visitor of types with default behavior appropriate for
* the {@link javax.lang.model.SourceVersion#RELEASE_7 RELEASE_7}
@ -66,8 +69,11 @@ import javax.lang.model.type.*;
*
* @see AbstractTypeVisitor6
* @see AbstractTypeVisitor8
* @see AbstractTypeVisitor9
* @since 1.7
*/
@SuppressWarnings("deprecation") // Superclass deprecated
@SupportedSourceVersion(RELEASE_7)
public abstract class AbstractTypeVisitor7<R, P> extends AbstractTypeVisitor6<R, P> {
/**
* Constructor for concrete subclasses to call.

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,8 +25,11 @@
package javax.lang.model.util;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.type.*;
import static javax.lang.model.SourceVersion.*;
/**
* A skeletal visitor of types with default behavior appropriate for
* the {@link javax.lang.model.SourceVersion#RELEASE_8 RELEASE_8}
@ -66,8 +69,10 @@ import javax.lang.model.type.*;
*
* @see AbstractTypeVisitor6
* @see AbstractTypeVisitor7
* @see AbstractTypeVisitor9
* @since 1.8
*/
@SupportedSourceVersion(RELEASE_8)
public abstract class AbstractTypeVisitor8<R, P> extends AbstractTypeVisitor7<R, P> {
/**
* Constructor for concrete subclasses to call.

@ -0,0 +1,74 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.lang.model.util;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.type.*;
import static javax.lang.model.SourceVersion.*;
/**
* A skeletal visitor of types with default behavior appropriate for
* the {@link javax.lang.model.SourceVersion#RELEASE_9 RELEASE_9}
* source version.
*
* <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
* by this class may have methods added to it in the future to
* accommodate new, currently unknown, language structures added to
* future versions of the Java&trade; programming language.
* Therefore, methods whose names begin with {@code "visit"} may be
* added to this class in the future; to avoid incompatibilities,
* classes which extend this class should not declare any instance
* methods with names beginning with {@code "visit"}.
*
* <p>When such a new visit method is added, the default
* implementation in this class will be to call the {@link
* #visitUnknown visitUnknown} method. A new abstract type visitor
* class will also be introduced to correspond to the new language
* level; this visitor will have different default behavior for the
* visit method in question. When the new visitor is introduced, all
* or portions of this visitor may be deprecated.
*
* @param <R> the return type of this visitor's methods. Use {@link
* Void} for visitors that do not need to return results.
* @param <P> the type of the additional parameter to this visitor's
* methods. Use {@code Void} for visitors that do not need an
* additional parameter.
*
* @see AbstractTypeVisitor6
* @see AbstractTypeVisitor7
* @see AbstractTypeVisitor8
* @since 1.9
*/
@SupportedSourceVersion(RELEASE_9)
public abstract class AbstractTypeVisitor9<R, P> extends AbstractTypeVisitor8<R, P> {
/**
* Constructor for concrete subclasses to call.
*/
protected AbstractTypeVisitor9() {
super();
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -88,8 +88,12 @@ import javax.lang.model.SourceVersion;
*
* @see ElementKindVisitor7
* @see ElementKindVisitor8
* @see ElementKindVisitor9
* @since 1.6
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@SupportedSourceVersion(RELEASE_6)
public class ElementKindVisitor6<R, P>
extends SimpleElementVisitor6<R, P> {

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -82,8 +82,10 @@ import static javax.lang.model.SourceVersion.*;
*
* @see ElementKindVisitor6
* @see ElementKindVisitor8
* @see ElementKindVisitor9
* @since 1.7
*/
@SuppressWarnings("deprecation") // Superclass deprecated
@SupportedSourceVersion(RELEASE_7)
public class ElementKindVisitor7<R, P> extends ElementKindVisitor6<R, P> {
/**

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -82,6 +82,7 @@ import javax.lang.model.SourceVersion;
*
* @see ElementKindVisitor6
* @see ElementKindVisitor7
* @see ElementKindVisitor9
* @since 1.8
*/
@SupportedSourceVersion(RELEASE_8)

@ -0,0 +1,98 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.lang.model.util;
import javax.lang.model.element.*;
import javax.annotation.processing.SupportedSourceVersion;
import static javax.lang.model.SourceVersion.*;
import javax.lang.model.SourceVersion;
/**
* A visitor of program elements based on their {@linkplain
* ElementKind kind} with default behavior appropriate for the {@link
* SourceVersion#RELEASE_9 RELEASE_9} source version. For {@linkplain
* Element elements} <tt><i>XYZ</i></tt> that may have more than one
* kind, the <tt>visit<i>XYZ</i></tt> methods in this class delegate
* to the <tt>visit<i>XYZKind</i></tt> method corresponding to the
* first argument's kind. The <tt>visit<i>XYZKind</i></tt> methods
* call {@link #defaultAction defaultAction}, passing their arguments
* to {@code defaultAction}'s corresponding parameters.
*
* <p> Methods in this class may be overridden subject to their
* general contract. Note that annotating methods in concrete
* subclasses with {@link java.lang.Override @Override} will help
* ensure that methods are overridden as intended.
*
* <p> <b>WARNING:</b> The {@code ElementVisitor} interface
* implemented by this class may have methods added to it or the
* {@code ElementKind} {@code enum} used in this case may have
* constants added to it in the future to accommodate new, currently
* unknown, language structures added to future versions of the
* Java&trade; programming language. Therefore, methods whose names
* begin with {@code "visit"} may be added to this class in the
* future; to avoid incompatibilities, classes which extend this class
* should not declare any instance methods with names beginning with
* {@code "visit"}.
*
* <p>When such a new visit method is added, the default
* implementation in this class will be to call the {@link
* #visitUnknown visitUnknown} method. A new abstract element kind
* visitor class will also be introduced to correspond to the new
* language level; this visitor will have different default behavior
* for the visit method in question. When the new visitor is
* introduced, all or portions of this visitor may be deprecated.
*
* @param <R> the return type of this visitor's methods. Use {@link
* Void} for visitors that do not need to return results.
* @param <P> the type of the additional parameter to this visitor's
* methods. Use {@code Void} for visitors that do not need an
* additional parameter.
*
* @see ElementKindVisitor6
* @see ElementKindVisitor7
* @see ElementKindVisitor8
* @since 1.9
*/
@SupportedSourceVersion(RELEASE_9)
public class ElementKindVisitor9<R, P> extends ElementKindVisitor8<R, P> {
/**
* Constructor for concrete subclasses; uses {@code null} for the
* default value.
*/
protected ElementKindVisitor9() {
super(null);
}
/**
* Constructor for concrete subclasses; uses the argument for the
* default value.
*
* @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
*/
protected ElementKindVisitor9(R defaultValue) {
super(defaultValue);
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -90,8 +90,12 @@ import static javax.lang.model.SourceVersion.*;
*
* @see ElementScanner7
* @see ElementScanner8
* @see ElementScanner9
* @since 1.6
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@SupportedSourceVersion(RELEASE_6)
public class ElementScanner6<R, P> extends AbstractElementVisitor6<R, P> {
/**

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -86,8 +86,10 @@ import static javax.lang.model.SourceVersion.*;
*
* @see ElementScanner6
* @see ElementScanner8
* @see ElementScanner9
* @since 1.7
*/
@SuppressWarnings("deprecation") // Superclass deprecated
@SupportedSourceVersion(RELEASE_7)
public class ElementScanner7<R, P> extends ElementScanner6<R, P> {
/**

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -86,6 +86,7 @@ import static javax.lang.model.SourceVersion.*;
*
* @see ElementScanner6
* @see ElementScanner7
* @see ElementScanner9
* @since 1.8
*/
@SupportedSourceVersion(RELEASE_8)

@ -0,0 +1,111 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.lang.model.util;
import javax.lang.model.element.*;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import static javax.lang.model.SourceVersion.*;
/**
* A scanning visitor of program elements with default behavior
* appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9}
* source version. The <tt>visit<i>XYZ</i></tt> methods in this
* class scan their component elements by calling {@code scan} on
* their {@linkplain Element#getEnclosedElements enclosed elements},
* {@linkplain ExecutableElement#getParameters parameters}, etc., as
* indicated in the individual method specifications. A subclass can
* control the order elements are visited by overriding the
* <tt>visit<i>XYZ</i></tt> methods. Note that clients of a scanner
* may get the desired behavior be invoking {@code v.scan(e, p)} rather
* than {@code v.visit(e, p)} on the root objects of interest.
*
* <p>When a subclass overrides a <tt>visit<i>XYZ</i></tt> method, the
* new method can cause the enclosed elements to be scanned in the
* default way by calling <tt>super.visit<i>XYZ</i></tt>. In this
* fashion, the concrete visitor can control the ordering of traversal
* over the component elements with respect to the additional
* processing; for example, consistently calling
* <tt>super.visit<i>XYZ</i></tt> at the start of the overridden
* methods will yield a preorder traversal, etc. If the component
* elements should be traversed in some other order, instead of
* calling <tt>super.visit<i>XYZ</i></tt>, an overriding visit method
* should call {@code scan} with the elements in the desired order.
*
* <p> Methods in this class may be overridden subject to their
* general contract. Note that annotating methods in concrete
* subclasses with {@link java.lang.Override @Override} will help
* ensure that methods are overridden as intended.
*
* <p> <b>WARNING:</b> The {@code ElementVisitor} interface
* implemented by this class may have methods added to it in the
* future to accommodate new, currently unknown, language structures
* added to future versions of the Java&trade; programming language.
* Therefore, methods whose names begin with {@code "visit"} may be
* added to this class in the future; to avoid incompatibilities,
* classes which extend this class should not declare any instance
* methods with names beginning with {@code "visit"}.
*
* <p>When such a new visit method is added, the default
* implementation in this class will be to call the {@link
* #visitUnknown visitUnknown} method. A new element scanner visitor
* class will also be introduced to correspond to the new language
* level; this visitor will have different default behavior for the
* visit method in question. When the new visitor is introduced, all
* or portions of this visitor may be deprecated.
*
* @param <R> the return type of this visitor's methods. Use {@link
* Void} for visitors that do not need to return results.
* @param <P> the type of the additional parameter to this visitor's
* methods. Use {@code Void} for visitors that do not need an
* additional parameter.
*
* @see ElementScanner6
* @see ElementScanner7
* @see ElementScanner8
* @since 1.9
*/
@SupportedSourceVersion(RELEASE_9)
public class ElementScanner9<R, P> extends ElementScanner8<R, P> {
/**
* Constructor for concrete subclasses; uses {@code null} for the
* default value.
*/
protected ElementScanner9(){
super(null);
}
/**
* Constructor for concrete subclasses; uses the argument for the
* default value.
*
* @param defaultValue the default value
*/
protected ElementScanner9(R defaultValue){
super(defaultValue);
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -81,8 +81,12 @@ import javax.annotation.processing.SupportedSourceVersion;
*
* @see SimpleAnnotationValueVisitor7
* @see SimpleAnnotationValueVisitor8
* @see SimpleAnnotationValueVisitor9
* @since 1.6
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@SupportedSourceVersion(RELEASE_6)
public class SimpleAnnotationValueVisitor6<R, P>
extends AbstractAnnotationValueVisitor6<R, P> {

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -72,8 +72,10 @@ import static javax.lang.model.SourceVersion.*;
*
* @see SimpleAnnotationValueVisitor6
* @see SimpleAnnotationValueVisitor8
* @see SimpleAnnotationValueVisitor9
* @since 1.7
*/
@SuppressWarnings("deprecation") // Superclass deprecated
@SupportedSourceVersion(RELEASE_7)
public class SimpleAnnotationValueVisitor7<R, P> extends SimpleAnnotationValueVisitor6<R, P> {
/**

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -72,6 +72,7 @@ import static javax.lang.model.SourceVersion.*;
*
* @see SimpleAnnotationValueVisitor6
* @see SimpleAnnotationValueVisitor7
* @see SimpleAnnotationValueVisitor8
* @since 1.8
*/
@SupportedSourceVersion(RELEASE_8)

@ -0,0 +1,88 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.lang.model.util;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import static javax.lang.model.SourceVersion.*;
/**
* A simple visitor for annotation values with default behavior
* appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9}
* source version. Visit methods call {@link #defaultAction
* defaultAction} passing their arguments to {@code defaultAction}'s
* corresponding parameters.
*
* <p> Methods in this class may be overridden subject to their
* general contract. Note that annotating methods in concrete
* subclasses with {@link java.lang.Override @Override} will help
* ensure that methods are overridden as intended.
*
* <p> <b>WARNING:</b> The {@code AnnotationValueVisitor} interface
* implemented by this class may have methods added to it in the
* future to accommodate new, currently unknown, language structures
* added to future versions of the Java&trade; programming language.
* Therefore, methods whose names begin with {@code "visit"} may be
* added to this class in the future; to avoid incompatibilities,
* classes which extend this class should not declare any instance
* methods with names beginning with {@code "visit"}.
*
* <p>When such a new visit method is added, the default
* implementation in this class will be to call the {@link
* #visitUnknown visitUnknown} method. A new simple annotation
* value visitor class will also be introduced to correspond to the
* new language level; this visitor will have different default
* behavior for the visit method in question. When the new visitor is
* introduced, all or portions of this visitor may be deprecated.
*
* @param <R> the return type of this visitor's methods
* @param <P> the type of the additional parameter to this visitor's methods.
*
* @see SimpleAnnotationValueVisitor6
* @see SimpleAnnotationValueVisitor7
* @see SimpleAnnotationValueVisitor8
* @since 1.9
*/
@SupportedSourceVersion(RELEASE_9)
public class SimpleAnnotationValueVisitor9<R, P> extends SimpleAnnotationValueVisitor8<R, P> {
/**
* Constructor for concrete subclasses; uses {@code null} for the
* default value.
*/
protected SimpleAnnotationValueVisitor9() {
super(null);
}
/**
* Constructor for concrete subclasses; uses the argument for the
* default value.
*
* @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
*/
protected SimpleAnnotationValueVisitor9(R defaultValue) {
super(defaultValue);
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -85,8 +85,12 @@ import static javax.lang.model.SourceVersion.*;
*
* @see SimpleElementVisitor7
* @see SimpleElementVisitor8
* @see SimpleElementVisitor9
* @since 1.6
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@SupportedSourceVersion(RELEASE_6)
public class SimpleElementVisitor6<R, P> extends AbstractElementVisitor6<R, P> {
/**

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -78,8 +78,10 @@ import static javax.lang.model.SourceVersion.*;
*
* @see SimpleElementVisitor6
* @see SimpleElementVisitor8
* @see SimpleElementVisitor9
* @since 1.7
*/
@SuppressWarnings("deprecation") // Superclass deprecated
@SupportedSourceVersion(RELEASE_7)
public class SimpleElementVisitor7<R, P> extends SimpleElementVisitor6<R, P> {
/**

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -34,7 +34,7 @@ import static javax.lang.model.SourceVersion.*;
* appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8}
* source version.
*
* Visit methods corresponding to {@code RELEASE_7} and earlier
* Visit methods corresponding to {@code RELEASE_8} and earlier
* language constructs call {@link #defaultAction defaultAction},
* passing their arguments to {@code defaultAction}'s corresponding
* parameters.
@ -77,6 +77,7 @@ import static javax.lang.model.SourceVersion.*;
*
* @see SimpleElementVisitor6
* @see SimpleElementVisitor7
* @see SimpleElementVisitor9
* @since 1.8
*/
@SupportedSourceVersion(RELEASE_8)

@ -0,0 +1,93 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.lang.model.util;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import static javax.lang.model.SourceVersion.*;
/**
* A simple visitor of program elements with default behavior
* appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9}
* source version.
*
* Visit methods corresponding to {@code RELEASE_9} and earlier
* language constructs call {@link #defaultAction defaultAction},
* passing their arguments to {@code defaultAction}'s corresponding
* parameters.
*
* <p> Methods in this class may be overridden subject to their
* general contract. Note that annotating methods in concrete
* subclasses with {@link java.lang.Override @Override} will help
* ensure that methods are overridden as intended.
*
* <p> <b>WARNING:</b> The {@code ElementVisitor} interface
* implemented by this class may have methods added to it in the
* future to accommodate new, currently unknown, language structures
* added to future versions of the Java&trade; programming language.
* Therefore, methods whose names begin with {@code "visit"} may be
* added to this class in the future; to avoid incompatibilities,
* classes which extend this class should not declare any instance
* methods with names beginning with {@code "visit"}.
*
* <p>When such a new visit method is added, the default
* implementation in this class will be to call the {@link
* #visitUnknown visitUnknown} method. A new simple element visitor
* class will also be introduced to correspond to the new language
* level; this visitor will have different default behavior for the
* visit method in question. When the new visitor is introduced, all
* or portions of this visitor may be deprecated.
*
* @param <R> the return type of this visitor's methods. Use {@code Void}
* for visitors that do not need to return results.
* @param <P> the type of the additional parameter to this visitor's methods. Use {@code Void}
* for visitors that do not need an additional parameter.
*
* @see SimpleElementVisitor6
* @see SimpleElementVisitor7
* @see SimpleElementVisitor8
* @since 1.9
*/
@SupportedSourceVersion(RELEASE_9)
public class SimpleElementVisitor9<R, P> extends SimpleElementVisitor8<R, P> {
/**
* Constructor for concrete subclasses; uses {@code null} for the
* default value.
*/
protected SimpleElementVisitor9(){
super(null);
}
/**
* Constructor for concrete subclasses; uses the argument for the
* default value.
*
* @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
*/
protected SimpleElementVisitor9(R defaultValue){
super(defaultValue);
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -85,8 +85,12 @@ import static javax.lang.model.SourceVersion.*;
*
* @see SimpleTypeVisitor7
* @see SimpleTypeVisitor8
* @see SimpleTypeVisitor9
* @since 1.6
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@SupportedSourceVersion(RELEASE_6)
public class SimpleTypeVisitor6<R, P> extends AbstractTypeVisitor6<R, P> {
/**

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -78,8 +78,10 @@ import static javax.lang.model.SourceVersion.*;
*
* @see SimpleTypeVisitor6
* @see SimpleTypeVisitor8
* @see SimpleTypeVisitor9
* @since 1.7
*/
@SuppressWarnings("deprecation") // Superclass deprecated
@SupportedSourceVersion(RELEASE_7)
public class SimpleTypeVisitor7<R, P> extends SimpleTypeVisitor6<R, P> {
/**

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -32,7 +32,7 @@ import static javax.lang.model.SourceVersion.*;
/**
* A simple visitor of types with default behavior appropriate for the
* {@link SourceVersion#RELEASE_7 RELEASE_7} source version.
* {@link SourceVersion#RELEASE_8 RELEASE_8} source version.
*
* Visit methods corresponding to {@code RELEASE_8} and earlier
* language constructs call {@link #defaultAction defaultAction},
@ -78,6 +78,7 @@ import static javax.lang.model.SourceVersion.*;
*
* @see SimpleTypeVisitor6
* @see SimpleTypeVisitor7
* @see SimpleTypeVisitor9
* @since 1.8
*/
@SupportedSourceVersion(RELEASE_8)

@ -0,0 +1,93 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.lang.model.util;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import javax.lang.model.type.IntersectionType;
import static javax.lang.model.SourceVersion.*;
/**
* A simple visitor of types with default behavior appropriate for the
* {@link SourceVersion#RELEASE_9 RELEASE_9} source version.
*
* Visit methods corresponding to {@code RELEASE_9} and earlier
* language constructs call {@link #defaultAction defaultAction},
* passing their arguments to {@code defaultAction}'s corresponding
* parameters.
*
* <p> Methods in this class may be overridden subject to their
* general contract. Note that annotating methods in concrete
* subclasses with {@link java.lang.Override @Override} will help
* ensure that methods are overridden as intended.
*
* <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
* by this class may have methods added to it in the future to
* accommodate new, currently unknown, language structures added to
* future versions of the Java&trade; programming language.
* Therefore, methods whose names begin with {@code "visit"} may be
* added to this class in the future; to avoid incompatibilities,
* classes which extend this class should not declare any instance
* methods with names beginning with {@code "visit"}.
*
* <p>When such a new visit method is added, the default
* implementation in this class will be to call the {@link
* #visitUnknown visitUnknown} method. A new simple type visitor
* class will also be introduced to correspond to the new language
* level; this visitor will have different default behavior for the
* visit method in question. When the new visitor is introduced, all
* or portions of this visitor may be deprecated.
*
* @param <R> the return type of this visitor's methods. Use {@link
* Void} for visitors that do not need to return results.
* @param <P> the type of the additional parameter to this visitor's
* methods. Use {@code Void} for visitors that do not need an
* additional parameter.
*
* @see SimpleTypeVisitor6
* @see SimpleTypeVisitor7
* @since 1.8
*/
@SupportedSourceVersion(RELEASE_9)
public class SimpleTypeVisitor9<R, P> extends SimpleTypeVisitor8<R, P> {
/**
* Constructor for concrete subclasses; uses {@code null} for the
* default value.
*/
protected SimpleTypeVisitor9(){
super(null);
}
/**
* Constructor for concrete subclasses; uses the argument for the
* default value.
*
* @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
*/
protected SimpleTypeVisitor9(R defaultValue){
super(defaultValue);
}
}

@ -85,7 +85,10 @@ import static javax.lang.model.SourceVersion.*;
* @see TypeKindVisitor7
* @see TypeKindVisitor8
* @since 1.6
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
@Deprecated
@SupportedSourceVersion(RELEASE_6)
public class TypeKindVisitor6<R, P> extends SimpleTypeVisitor6<R, P> {
/**

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -82,6 +82,7 @@ import javax.lang.model.SourceVersion;
* @see TypeKindVisitor8
* @since 1.7
*/
@SuppressWarnings("deprecation") // Superclass deprecated
@SupportedSourceVersion(RELEASE_7)
public class TypeKindVisitor7<R, P> extends TypeKindVisitor6<R, P> {
/**

@ -0,0 +1,96 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.lang.model.util;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import javax.lang.model.type.*;
import static javax.lang.model.SourceVersion.*;
/**
* A visitor of types based on their {@linkplain TypeKind kind} with
* default behavior appropriate for the {@link SourceVersion#RELEASE_9
* RELEASE_9} source version. For {@linkplain
* TypeMirror types} <tt><i>XYZ</i></tt> that may have more than one
* kind, the <tt>visit<i>XYZ</i></tt> methods in this class delegate
* to the <tt>visit<i>XYZKind</i></tt> method corresponding to the
* first argument's kind. The <tt>visit<i>XYZKind</i></tt> methods
* call {@link #defaultAction defaultAction}, passing their arguments
* to {@code defaultAction}'s corresponding parameters.
*
* <p> Methods in this class may be overridden subject to their
* general contract. Note that annotating methods in concrete
* subclasses with {@link java.lang.Override @Override} will help
* ensure that methods are overridden as intended.
*
* <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
* by this class may have methods added to it in the future to
* accommodate new, currently unknown, language structures added to
* future versions of the Java&trade; programming language.
* Therefore, methods whose names begin with {@code "visit"} may be
* added to this class in the future; to avoid incompatibilities,
* classes which extend this class should not declare any instance
* methods with names beginning with {@code "visit"}.
*
* <p>When such a new visit method is added, the default
* implementation in this class will be to call the {@link
* #visitUnknown visitUnknown} method. A new type kind visitor class
* will also be introduced to correspond to the new language level;
* this visitor will have different default behavior for the visit
* method in question. When the new visitor is introduced, all or
* portions of this visitor may be deprecated.
*
* @param <R> the return type of this visitor's methods. Use {@link
* Void} for visitors that do not need to return results.
* @param <P> the type of the additional parameter to this visitor's
* methods. Use {@code Void} for visitors that do not need an
* additional parameter.
*
* @see TypeKindVisitor6
* @see TypeKindVisitor7
* @see TypeKindVisitor8
* @since 1.9
*/
@SupportedSourceVersion(RELEASE_9)
public class TypeKindVisitor9<R, P> extends TypeKindVisitor8<R, P> {
/**
* Constructor for concrete subclasses to call; uses {@code null}
* for the default value.
*/
protected TypeKindVisitor9() {
super(null);
}
/**
* Constructor for concrete subclasses to call; uses the argument
* for the default value.
*
* @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
*/
protected TypeKindVisitor9(R defaultValue) {
super(defaultValue);
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -138,7 +138,7 @@ public class CheckNamesProcessor extends AbstractProcessor {
public SourceVersion getSupportedSourceVersion() {
/*
* Return latest source version instead of a fixed version
* like RELEASE_8. To return a fixed version, this class
* like RELEASE_9. To return a fixed version, this class
* could be annotated with a SupportedSourceVersion
* annotation.
*
@ -192,7 +192,7 @@ public class CheckNamesProcessor extends AbstractProcessor {
/**
* Visitor to implement name checks.
*/
private class NameCheckScanner extends ElementScanner8<Void, Void> {
private class NameCheckScanner extends ElementScanner9<Void, Void> {
// The visitor could be enhanced to return true/false if
// there were warnings reported or a count of the number
// of warnings. This could be facilitated by using

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -39,7 +39,7 @@ import java.lang.reflect.*;
import java.io.Writer;
import java.util.*;
import static javax.lang.model.SourceVersion.RELEASE_8;
import static javax.lang.model.SourceVersion.RELEASE_9;
import static java.util.Objects.*;
/**
@ -487,10 +487,10 @@ public class CoreReflectionFactory {
/**
* Base class for concrete visitors of elements backed by core reflection.
*/
public static abstract class AbstractReflectionElementVisitor8<R, P>
extends AbstractElementVisitor8<R, P>
public static abstract class AbstractReflectionElementVisitor9<R, P>
extends AbstractElementVisitor9<R, P>
implements ReflectionElementVisitor<R, P> {
protected AbstractReflectionElementVisitor8() {
protected AbstractReflectionElementVisitor9() {
super();
}
}
@ -498,16 +498,16 @@ public class CoreReflectionFactory {
/**
* Base class for simple visitors of elements that are backed by core reflection.
*/
@SupportedSourceVersion(value=RELEASE_8)
public static abstract class SimpleReflectionElementVisitor8<R, P>
extends SimpleElementVisitor8<R, P>
@SupportedSourceVersion(value=RELEASE_9)
public static abstract class SimpleReflectionElementVisitor9<R, P>
extends SimpleElementVisitor9<R, P>
implements ReflectionElementVisitor<R, P> {
protected SimpleReflectionElementVisitor8(){
protected SimpleReflectionElementVisitor9(){
super();
}
protected SimpleReflectionElementVisitor8(R defaultValue) {
protected SimpleReflectionElementVisitor9(R defaultValue) {
super(defaultValue);
}
@ -2527,7 +2527,7 @@ public class CoreReflectionFactory {
Constructor<?> printProcCtor = printProcClass.getConstructor(Writer.class, Elements.class);
return (ElementVisitor) printProcCtor.newInstance(w, getElements());
} catch (ReflectiveOperationException | SecurityException e) {
return new ElementScanner8<Writer, Void>(w){
return new ElementScanner9<Writer, Void>(w){
@Override
public Writer scan(Element e, Void v) {
try {

@ -58,7 +58,6 @@ Sub-test 32 Expect: <A HREF=".p2/package-summary.html#package_description">./p2/
<p>
Sub-test 33 Actual: <A HREF="{@docRoot}../docs1/p2/package-summary.html#package_description">{&#064;docRoot}/../docs1/p2/package-summary.html#package_description</A> <br>
Sub-test 33 Expect: <A HREF=".../docs1/p2/package-summary.html#package_description">./../docs1/p2/package-summary.html#package_description</A>
<p>
</BODY>
</HTML>

@ -59,7 +59,6 @@ Sub-test 21 Expect: <A HREF="..p2/package-summary.html#package_description">../p
Sub-test 22 Actual: <A HREF="{@docRoot}../docs1/p2/package-summary.html#package_description">{&#064;docRoot}/../docs1/p2/package-summary.html#package_description</A> <br>
Sub-test 22 Expect: <A HREF="..../docs1/p2/package-summary.html#package_description">../../docs1/p2/package-summary.html#package_description</A>
<p>
</BODY>
</HTML>

@ -110,7 +110,7 @@ public class CheckLocalElements extends Checker {
return encl == null ? "" : encl.accept(qualNameVisitor, null);
}
private ElementVisitor<String,Void> qualNameVisitor = new SimpleElementVisitor8<String,Void>() {
private ElementVisitor<String,Void> qualNameVisitor = new SimpleElementVisitor9<String,Void>() {
protected String defaultAction(Element e, Void ignore) {
return "";
}

@ -129,7 +129,7 @@ public abstract class LocalVariableTestBase extends TestBase {
}
}
private void checkNamesAndTypes(List<LocalVariableTableTest.LocalVariableTable.Entry> entries,
private void checkNamesAndTypes(List<VariableTable.Entry> entries,
Map<String, String> expectedLocals2Types) {
Map<String, List<String>> actualNames2Types = entries.stream()
.collect(
@ -163,7 +163,7 @@ public abstract class LocalVariableTestBase extends TestBase {
}
private void checkDoubleAndLongIndexes(Collection<LocalVariableTableTest.LocalVariableTable.Entry> entries,
private void checkDoubleAndLongIndexes(Collection<VariableTable.Entry> entries,
Map<String, Integer> scopes, int maxLocals) {
//check every scope separately
Map<Object, List<VariableTable.Entry>> entriesByScope = groupByScope(entries, scopes);
@ -185,7 +185,7 @@ public abstract class LocalVariableTestBase extends TestBase {
}
private Map<Object, List<VariableTable.Entry>> groupByScope(
Collection<LocalVariableTableTest.LocalVariableTable.Entry> entries, Map<String, Integer> scopes) {
Collection<VariableTable.Entry> entries, Map<String, Integer> scopes) {
return entries.stream().collect(groupingBy(e -> scopes.getOrDefault(e.name() + "&" + e.type(), DEFAULT_SCOPE)));
}
@ -203,7 +203,7 @@ public abstract class LocalVariableTestBase extends TestBase {
int localVariableTableLength();
List<LocalVariableTableTest.VariableTable.Entry> entries();
List<VariableTable.Entry> entries();
int attributeLength();

@ -1,32 +1,9 @@
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @test /nodynamiccopyright/
* @bug 5086027
* @summary Inner class of generic class cannot extend Throwable
* @author Peter von der Ah\u00e9
* @compile/fail T5086027.java
* @compile/fail/ref=T5086027.out -XDrawDiagnostics T5086027.java
*/
public class T5086027<T> {

@ -0,0 +1,2 @@
T5086027.java:10:21: compiler.err.generic.throwable
1 error

@ -1,31 +1,8 @@
/*
* Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @test /nodynamiccopyright/
* @bug 6227936
* @summary Wrong type of inherited method using specialized type parameter
* @compile/fail Orig.java
* @compile/fail/ref=Orig.out -XDrawDiagnostics Orig.java
*/
class GenericTest {

@ -0,0 +1,2 @@
Orig.java:27:26: compiler.err.cant.resolve.location.args: kindname.method, someMethod, , , (compiler.misc.location: kindname.class, GenericTest.C, null)
1 error

@ -1,31 +1,8 @@
/*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @test /nodynamiccopyright/
* @bug 6270396 6245699
* @summary Missing bridge for final method (gives AbstractMethodError at runtime)
* @compile/fail T6245699b.java
* @compile/fail/ref=T6245699b.out -XDrawDiagnostics T6245699b.java
*/
public class T6245699b {

@ -0,0 +1,2 @@
T6245699b.java:23:23: compiler.err.override.meth: (compiler.misc.cant.override: doIt(), T6245699b.Bar, doIt(), T6245699b.Foo), final
1 error

@ -1,32 +1,9 @@
/*
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @test /nodynamiccopyright/
* @bug 6294779
* @summary Problem with interface inheritance and covariant return types
* @author Maurizio Cimadamore
* @compile/fail T6294779c.java
* @compile/fail/ref=T6294779c.out -XDrawDiagnostics T6294779c.java
*/
public class T6294779c<X> {

@ -0,0 +1,2 @@
T6294779c.java:29:5: compiler.err.types.incompatible.diff.ret: T6294779c.I2, T6294779c.I1, get()
1 error

@ -1,31 +1,8 @@
/*
* Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @test /nodynamiccopyright/
* @bug 6413682
* @summary Compiler confused about implicit type args and arrays
* @compile/fail T6413682.java
* @compile/fail/ref=T6413682.out -XDrawDiagnostics T6413682.java
*/
public class T6413682 {

@ -0,0 +1,2 @@
T6413682.java:11:2: compiler.err.cannot.create.array.with.type.arguments
1 error

@ -1,32 +1,9 @@
/*
* Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @test /nodynamiccopyright/
* @bug 6495506
* @summary Cast inserted by generics can cause IllegalAccessError
* @compile A.java
* @compile/fail T6495506.java
* @compile/fail/ref=T6495506.out -XDrawDiagnostics T6495506.java
*/
public class T6495506 {

@ -0,0 +1,2 @@
T6495506.java:12:28: compiler.err.report.access: a.A.P, private, a.A
1 error

@ -1,33 +1,10 @@
/*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @test /nodynamiccopyright/
* @bug 5057445
* @summary javac allows catching type parameter
* @author gafter
*
* @compile/fail CatchTyparam.java
* @compile/fail/ref=CatchTyparam.out -XDrawDiagnostics CatchTyparam.java
*/
class J {

@ -0,0 +1,3 @@
CatchTyparam.java:14:18: compiler.err.type.found.req: (compiler.misc.type.parameter: T), (compiler.misc.type.req.class)
CatchTyparam.java:15:18: compiler.err.type.found.req: (compiler.misc.type.parameter: U), (compiler.misc.type.req.class)
2 errors

@ -1,31 +1,8 @@
/*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @test /nodynamiccopyright/
* @bug 4941882
* @summary incorrect inference for result of lub(int[], float[])
* @compile/fail T4941882.java
* @compile/fail/ref=T4941882.out -XDrawDiagnostics T4941882.java
*/
public class T4941882 {

@ -0,0 +1,2 @@
T4941882.java:13:17: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Object&java.io.Serializable&java.lang.Cloneable, java.lang.Object[],java.lang.Object)
1 error

@ -1,31 +1,8 @@
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @test /nodynamiccopyright/
* @bug 4972073
* @summary same interface allowed twice in compound type
* @compile/fail T4972073.java
* @compile/fail/ref=T4972073.out -XDrawDiagnostics T4972073.java
*/
public class T4972073 {

@ -0,0 +1,3 @@
T4972073.java:18:80: compiler.err.repeated.interface
T4972073.java:24:68: compiler.err.repeated.interface
2 errors

@ -1,31 +1,8 @@
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @test /nodynamiccopyright/
* @bug 4972073
* @summary same interface allowed twice in compound type
* @compile/fail T4972073a.java
* @compile/fail/ref=T4972073a.out -XDrawDiagnostics T4972073a.java
*/
public class T4972073a {

@ -0,0 +1,2 @@
T4972073a.java:18:80: compiler.err.repeated.interface
1 error

@ -1,31 +1,8 @@
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @test /nodynamiccopyright/
* @bug 4972073
* @summary same interface allowed twice in compound type
* @compile/fail T4972073b.java
* @compile/fail/ref=T4972073b.out -XDrawDiagnostics T4972073b.java
*/
public class T4972073b {

@ -0,0 +1,2 @@
T4972073b.java:18:68: compiler.err.repeated.interface
1 error

@ -1,32 +1,9 @@
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @test /nodynamiccopyright/
* @bug 5081782
* @summary type arguments to non-generic methods
* @author Peter von der Ah\u00e9
* @compile/fail Neg.java
* @compile/fail/ref=Neg.out -XDrawDiagnostics Neg.java
*/
public class Neg {

@ -0,0 +1,8 @@
Neg.java:12:14: compiler.err.cant.resolve.location: kindname.class, Can, , , (compiler.misc.location: kindname.class, Neg, null)
Neg.java:12:18: compiler.err.cant.resolve.location: kindname.class, I, , , (compiler.misc.location: kindname.class, Neg, null)
Neg.java:12:20: compiler.err.cant.resolve.location: kindname.class, write, , , (compiler.misc.location: kindname.class, Neg, null)
Neg.java:12:26: compiler.err.cant.resolve.location: kindname.class, a, , , (compiler.misc.location: kindname.class, Neg, null)
Neg.java:12:28: compiler.err.cant.resolve.location: kindname.class, little, , , (compiler.misc.location: kindname.class, Neg, null)
Neg.java:12:35: compiler.err.cant.resolve.location: kindname.class, story, , , (compiler.misc.location: kindname.class, Neg, null)
Neg.java:12:41: compiler.err.cant.resolve.location: kindname.class, here, , , (compiler.misc.location: kindname.class, Neg, null)
7 errors

@ -1,34 +1,11 @@
/*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @test /nodynamiccopyright/
* @bug 5073079
* @summary Allow unchecked override of generified methods in
* parameterless classes
* @author Peter von der Ah\u00e9
*
* @compile/fail Fail1.java
* @compile/fail/ref=Fail1.out -XDrawDiagnostics Fail1.java
*/
interface MyList<T> {}

@ -0,0 +1,2 @@
Fail1.java:21:1: compiler.err.does.not.override.abstract: C, f(MyList), A
1 error

@ -1,31 +1,8 @@
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @test /nodynamiccopyright/
* @bug 6318240
* @summary Creation of array of inner class of an enclosing wildcard type doesn't work
* @compile/fail BarNeg1.java
* @compile/fail/ref=BarNeg1.out -XDrawDiagnostics BarNeg1.java
*/
class BarNeg1<T> {

@ -0,0 +1,2 @@
BarNeg1.java:9:45: compiler.err.generic.array.creation
1 error

@ -1,31 +1,8 @@
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @test /nodynamiccopyright/
* @bug 6318240
* @summary Creation of array of inner class of an enclosing wildcard type doesn't work
* @compile/fail BarNeg1a.java
* @compile/fail/ref=BarNeg1a.out -XDrawDiagnostics BarNeg1a.java
*/
class BarNeg1a<T> {

@ -0,0 +1,2 @@
BarNeg1a.java:9:36: compiler.err.cant.select.static.class.from.param.type
1 error

@ -1,31 +1,8 @@
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @test /nodynamiccopyright/
* @bug 6318240
* @summary Creation of array of inner class of an enclosing wildcard type doesn't work
* @compile/fail BarNeg2.java
* @compile/fail/ref=BarNeg2.out -XDrawDiagnostics BarNeg2.java
*/
class BarNeg2<T> {

@ -0,0 +1,2 @@
BarNeg2.java:9:45: compiler.err.generic.array.creation
1 error

@ -1,31 +1,8 @@
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @test /nodynamiccopyright/
* @bug 6318240
* @summary Creation of array of inner class of an enclosing wildcard type doesn't work
* @compile/fail BarNeg2a.java
* @compile/fail/ref=BarNeg2a.out -XDrawDiagnostics BarNeg2a.java
*/
class BarNeg2a<T> {

@ -0,0 +1,2 @@
BarNeg2a.java:9:60: compiler.err.cant.select.static.class.from.param.type
1 error

@ -1,32 +1,9 @@
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @test /nodynamiccopyright/
* @bug 5060485
* @summary The scope of a class type parameter is too wide
* @author Peter von der Ah\u00e9
* @compile/fail Neg1.java
* @compile/fail/ref=Neg1.out -XDrawDiagnostics Neg1.java
*/
public class Neg1<X extends Y> {

Some files were not shown because too many files have changed in this diff Show More