| 
 | 1 | +<!DOCTYPE html>  | 
 | 2 | +<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">  | 
 | 3 | +<head>  | 
 | 4 | +  <meta charset="utf-8" />  | 
 | 5 | +  <meta name="generator" content="pandoc" />  | 
 | 6 | +  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />  | 
 | 7 | +  <title>Explanation of start of release changes</title>  | 
 | 8 | +  <style>  | 
 | 9 | +    code{white-space: pre-wrap;}  | 
 | 10 | +    span.smallcaps{font-variant: small-caps;}  | 
 | 11 | +    div.columns{display: flex; gap: min(4vw, 1.5em);}  | 
 | 12 | +    div.column{flex: auto; overflow-x: auto;}  | 
 | 13 | +    div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}  | 
 | 14 | +    /* The extra [class] is a hack that increases specificity enough to  | 
 | 15 | +       override a similar rule in reveal.js */  | 
 | 16 | +    ul.task-list[class]{list-style: none;}  | 
 | 17 | +    ul.task-list li input[type="checkbox"] {  | 
 | 18 | +      font-size: inherit;  | 
 | 19 | +      width: 0.8em;  | 
 | 20 | +      margin: 0 0.8em 0.2em -1.6em;  | 
 | 21 | +      vertical-align: middle;  | 
 | 22 | +    }  | 
 | 23 | +    .display.math{display: block; text-align: center; margin: 0.5rem auto;}  | 
 | 24 | +  </style>  | 
 | 25 | +  <link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css" />  | 
 | 26 | +  <!--[if lt IE 9]>  | 
 | 27 | +    <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>  | 
 | 28 | +  <![endif]-->  | 
 | 29 | +</head>  | 
 | 30 | +<body>  | 
 | 31 | +<header id="title-block-header">  | 
 | 32 | +<h1 class="title">Explanation of start of release changes</h1>  | 
 | 33 | +</header>  | 
 | 34 | +<nav id="TOC" role="doc-toc">  | 
 | 35 | +<ul>  | 
 | 36 | +<li><a href="#overview" id="toc-overview">Overview</a></li>  | 
 | 37 | +<li><a href="#details-and-file-updates"  | 
 | 38 | +id="toc-details-and-file-updates">Details and file updates</a>  | 
 | 39 | +<ul>  | 
 | 40 | +<li><a href="#meta-data-files" id="toc-meta-data-files">Meta-data  | 
 | 41 | +files</a></li>  | 
 | 42 | +<li><a href="#src-files" id="toc-src-files"><code>src</code>  | 
 | 43 | +files</a></li>  | 
 | 44 | +<li><a href="#test-files" id="toc-test-files"><code>test</code>  | 
 | 45 | +files</a></li>  | 
 | 46 | +</ul></li>  | 
 | 47 | +</ul>  | 
 | 48 | +</nav>  | 
 | 49 | +<h2 id="overview">Overview</h2>  | 
 | 50 | +<p>The start of release changes, the changes that turn JDK <em>N</em>  | 
 | 51 | +into JDK (<em>N</em>+1), are primarily small updates to various files  | 
 | 52 | +along with new files to store symbol information to allow  | 
 | 53 | +<code>javac --release N ...</code> to run on JDK (<em>N</em>+1).</p>  | 
 | 54 | +<p>The updates include changes to files holding meta-data about the  | 
 | 55 | +release, files under the <code>src</code> directory for API and tooling  | 
 | 56 | +updates, and incidental updates under the <code>test</code>  | 
 | 57 | +directory.</p>  | 
 | 58 | +<h2 id="details-and-file-updates">Details and file updates</h2>  | 
 | 59 | +<p>As a matter of policy, there are a number of semantically distinct  | 
 | 60 | +concepts which get incremented separately at the start of a new  | 
 | 61 | +release:</p>  | 
 | 62 | +<ul>  | 
 | 63 | +<li>Feature value of <code>Runtime.version()</code></li>  | 
 | 64 | +<li>Highest source version modeled by  | 
 | 65 | +<code>javax.lang.model.SourceVersion</code></li>  | 
 | 66 | +<li>Highest class file format major version recognized by the  | 
 | 67 | +platform</li>  | 
 | 68 | +<li>Highest  | 
 | 69 | +<code>-source</code>/<code>-target</code>/<code>--release</code>  | 
 | 70 | +argument recognized by <code>javac</code> and related tools</li>  | 
 | 71 | +</ul>  | 
 | 72 | +<p>The expected file updates are listed below. Additional files may need  | 
 | 73 | +to be updated for a particular release.</p>  | 
 | 74 | +<h3 id="meta-data-files">Meta-data files</h3>  | 
 | 75 | +<ul>  | 
 | 76 | +<li><code>jcheck/conf</code>: update meta-data used by  | 
 | 77 | +<code>jcheck</code> and the Skara tooling</li>  | 
 | 78 | +<li><code>make/conf/version-numbers.conf</code>: update to meta-data  | 
 | 79 | +used in the build</li>  | 
 | 80 | +</ul>  | 
 | 81 | +<h3 id="src-files"><code>src</code> files</h3>  | 
 | 82 | +<ul>  | 
 | 83 | +<li><code>src/hotspot/share/classfile/classFileParser.cpp</code>: add a  | 
 | 84 | +<code>#define</code> for the new version</li>  | 
 | 85 | +<li><code>src/java.base/share/classes/java/lang/classfile/ClassFile.java</code>:  | 
 | 86 | +add a constant for the new class file format version</li>  | 
 | 87 | +<li><code>src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java</code>:  | 
 | 88 | +add an <code>enum</code> constant for the new class file format  | 
 | 89 | +version</li>  | 
 | 90 | +<li><code>src/java.compiler/share/classes/javax/lang/model/SourceVersion.java</code>:  | 
 | 91 | +add an <code>enum</code> constant for the new source version</li>  | 
 | 92 | +<li><code>src/java.compiler/share/classes/javax/lang/model/util/*</code>  | 
 | 93 | +visitors: Update <code>@SupportedSourceVersion</code> annotations to  | 
 | 94 | +latest value. Note this update is done in lieu of introducing another  | 
 | 95 | +set of visitors for each Java SE release.</li>  | 
 | 96 | +<li><code>src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java</code>:  | 
 | 97 | +add an <code>enum</code> constant for the new source version internal to  | 
 | 98 | +<code>javac</code></li>  | 
 | 99 | +<li><code>src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java</code>:  | 
 | 100 | +add an <code>enum</code> constant for the new class file format version  | 
 | 101 | +internal to <code>javac</code></li>  | 
 | 102 | +<li><code>src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java</code>:  | 
 | 103 | +add an <code>enum</code> constant for the new target version internal to  | 
 | 104 | +<code>javac</code></li>  | 
 | 105 | +<li><code>src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java</code>  | 
 | 106 | +update printing processor to support the new source version</li>  | 
 | 107 | +<li>The symbol information for <code>--release</code> is stored as new  | 
 | 108 | +text files in the <code>src/jdk.compiler/share/data/symbols</code>  | 
 | 109 | +directory, one file per module. The README file in that directory  | 
 | 110 | +contains directions on how to create the files.</li>  | 
 | 111 | +</ul>  | 
 | 112 | +<h3 id="test-files"><code>test</code> files</h3>  | 
 | 113 | +<ul>  | 
 | 114 | +<li><code>test/langtools/tools/javac/api/TestGetSourceVersions.java</code>:  | 
 | 115 | +add new <code>SourceVersion</code> constant to test matrix.</li>  | 
 | 116 | +<li><code>test/langtools/tools/javac/classfiles/ClassVersionChecker.java</code>:  | 
 | 117 | +add new enum constant for the new class file version</li>  | 
 | 118 | +<li><code>test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java</code>  | 
 | 119 | +update annotation processor extended by <code>javac</code> tests to  | 
 | 120 | +cover the new source version</li>  | 
 | 121 | +<li><code>test/langtools/tools/javac/preview/classReaderTest/Client.nopreview.out</code>  | 
 | 122 | +and  | 
 | 123 | +<code>test/langtools/tools/javac/preview/classReaderTest/Client.preview.out</code>:  | 
 | 124 | +update expected messages for preview errors and warnings</li>  | 
 | 125 | +</ul>  | 
 | 126 | +</body>  | 
 | 127 | +</html>  | 
0 commit comments