Notes generated: Tue Mar 03 05:31:41 CET 2026
None.
| Issue | Description | ||||
|---|---|---|---|---|---|
| JDK-8369282 |
Distrust TLS Server Certificates Anchored by Chunghwa Root Certificates and Issued After March 17, 2026 The JDK will stop trusting TLS server certificates issued after March 17, 2026 and anchored by Chunghwa root certificates, in line with similar plans announced by Google and Mozilla. TLS server certificates issued on or before March 17, 2026 will continue to be trusted until they expire. Certificates issued after that date, and anchored by the Certificate Authority listed in the table below, will be rejected. The restrictions are enforced in the JDK implementation (the An application will receive an exception with a message indicating the trust anchor is not trusted, for example:
The JDK can be configured to trust these certificates again by removing "CHUNGHWA_TLS" from the The restrictions are imposed on the following Chunghwa Root certificates included in the JDK:
You can also use the
If any of the certificates in the chain are issued by one of the root CAs in the table above are listed in the output you will need to update the certificate or contact the organization that manages the server. |
| Issue | Description |
|---|---|
| JDK-8377450 |
JEP 378: Text Blocks SummaryAdd text blocks to the Java language. A text block is a multi-line string literal that avoids the need for most escape sequences, automatically formats the string in a predictable way, and gives the developer control over the format when desired. HistoryText blocks were proposed by JEP 355 in early 2019 as a follow-on to explorations begun in JEP 326 (Raw String Literals), which was initially targeted to JDK 12 but eventually withdrawn and did not appear in that release. JEP 355 was targeted to JDK 13 in June 2019 as a preview feature. Feedback on JDK 13 suggested that text blocks should be previewed again in JDK 14, with the addition of two new escape sequences. Consequently, JEP 368 was targeted to JDK 14 in November 2019 as a preview feature. Feedback on JDK 14 suggested that text blocks were ready to become final and permanent in JDK 15 with no further changes. Goals
Non-Goals
MotivationIn Java, embedding a snippet of HTML, XML, SQL, or JSON in a string literal More generally, the need to denote short, medium, and long blocks of text in a Java program is near universal, whether the text is code from other programming languages, structured text representing golden files, or messages in natural languages. On the one hand, the Java language recognizes this need by allowing strings of unbounded size and content; on the other hand, it embodies a design default that strings should be small enough to denote on a single line of a source file (surrounded by " characters), and simple enough to escape easily. This design default is at odds with the large number of Java programs where strings are too long to fit comfortably on a single line. Accordingly, it would improve both the readability and the writability of a broad class of Java programs to have a linguistic mechanism for denoting strings more literally than a string literal -- across multiple lines and without the visual clutter of escapes. In essence, a two-dimensional block of text, rather than a one-dimensional sequence of characters. Still, it is impossible to predict the role of every string in Java programs. Just because a string spans multiple lines of source code does not mean that newline characters are desirable in the string. One part of a program may be more readable when strings are laid out over multiple lines, but the embedded newline characters may change the behavior of another part of the program. Accordingly, it would be helpful if the developer had precise control over where newlines appear, and, as a related matter, how much white space appears to the left and right of the "block" of text. HTML exampleUsing "one-dimensional" string literals
Using a "two-dimensional" block of text
SQL exampleUsing "one-dimensional" string literals
Using a "two-dimensional" block of text
Polyglot language exampleUsing "one-dimensional" string literals
Using a "two-dimensional" block of text ``` ScriptEngine engine = new ScriptEngineManager().getEngineByName("js"); Object obj = engine.eval(""" function hello() { print('"Hello, world"'); }
``` Description
A text block is a new kind of literal in the Java language. It may be used to denote a string anywhere that a string literal could appear, but offers greater expressiveness and less accidental complexity. A text block consists of zero or more content characters, enclosed by opening and closing delimiters. The opening delimiter is a sequence of three double quote characters ( The closing delimiter is a sequence of three double quote characters. The content ends at the last character before the first double quote of the closing delimiter. The content may include double quote characters directly, unlike the characters in a string literal. The use of The content may include line terminators directly, unlike the characters in a string literal. The use of
is equivalent to the string literal:
or a concatenation of string literals:
If a line terminator is not required at the end of the string, then the closing delimiter can be placed on the last line of content. For example, the text block:
is equivalent to the string literal:
A text block can denote the empty string, although this is not recommended because it needs two lines of source code:
Here are some examples of ill-formed text blocks:
Compile-time processingA text block is a constant expression of type
The processed content is recorded in the At run time, a text block is evaluated to an instance of The following sections discuss compile-time processing in more detail. 1. Line terminatorsLine terminators in the content are normalized from CR ( For example, if Java source code that was created on a Unix platform (where the line terminator is LF) is edited on a Windows platform (where the line terminator is CRLF), then without normalization, the content would become one character longer for each line. Any algorithm that relied on LF being the line terminator might fail, and any test that needed to verify string equality with The escape sequences 2. Incidental white spaceThe text blocks shown above were easier to read than their concatenated string literal counterparts, but the obvious interpretation for the content of a text block would include the spaces added to indent the embedded string so that it lines up neatly with the opening delimiter. Here is the HTML example using dots to visualize the spaces that the developer added for indentation:
Since the opening delimiter is generally positioned to appear on the same line as the statement or expression which consumes the text block, there is no real significance to the fact that 14 visualized spaces start each line. Including those spaces in the content would mean the text block denotes a string different from the one denoted by the concatenated string literals. This would hurt migration, and be a recurring source of surprise: it is overwhelmingly likely that the developer does not want those spaces in the string. Also, the closing delimiter is generally positioned to align with the content, which further suggests that the 14 visualized spaces are insignificant. Spaces may also appear at the end of each line, especially when a text block is populated by copy-pasting snippets from other files (which may themselves have been formed by copy-pasting from yet more files). Here is the HTML example reimagined with some trailing white space, again using dots to visualize spaces:
Trailing white space is most often unintentional, idiosyncratic, and insignificant. It is overwhelmingly likely that the developer does not care about it. Trailing white space characters are similar to line terminators, in that both are invisible artifacts of the source code editing environment. With no visual guide to the presence of trailing white space characters, including them in the content would be a recurring source of surprise, as it would affect the length, hash code, etc, of the string. Accordingly, an appropriate interpretation for the content of a text block is to differentiate incidental white space at the start and end of each line, from essential white space. The Java compiler processes the content by removing incidental white space to yield what the developer intended.
The re-indentation algorithm takes the content of a text block whose line terminators have been normalized to LF. It removes the same amount of white space from each line of content until at least one of the lines has a non-white space character in the leftmost position. The position of the opening
The escape sequences The re-indentation algorithm will be normative in The Java Language Specification. Developers will have access to it via Significant trailing line policyNormally, one would format a text block in two ways: first, position the left edge of the content to appear under the first However, because the trailing blank line is considered a determining line, moving it to the left has the effect of reducing the common white space prefix, and therefore reducing the the amount of white space that is stripped from the start of every line. In the extreme case, where the closing delimiter is moved all the way to the left, that reduces the common white space prefix to zero, effectively opting out of white space stripping. For example, with the closing delimiter moved all the way to the left, there is no incidental white space to visualize with dots:
Including the trailing blank line with the closing delimiter, the common white space prefix is zero, so zero white space is removed from the start of each line. The algorithm thus produces: (using
Alternatively, suppose the closing delimiter is not moved all the way to the left, but rather under the
The spaces visualized with dots are considered to be incidental:
Including the trailing blank line with the closing delimiter, the common white space prefix is eight, so eight white spaces are removed from the start of each line. The algorithm thus preserves the essential indentation of the content relative to the closing delimiter:
Finally, suppose the closing delimiter is moved slightly to the right of the content:
The spaces visualized with dots are considered to be incidental:
The common white space prefix is 14, so 14 white spaces are removed from the start of each line. The trailing blank line is stripped to leave an empty line, which being the last line is then discarded. In other words, moving the closing delimiter to the right of the content has no effect, and the algorithm again preserves the essential indentation of the content:
3. Escape sequencesAfter the content is re-indented, any escape sequences in the content are interpreted. Text blocks support all of the escape sequences supported in string literals, including Interpreting escapes as the final step allows developers to use
The CR escapes are not processed until after the line terminators have been normalized to LF. Using Unicode escapes to visualize LF (
Note that it is legal to use ``` String story = """ "When I use a word," Humpty Dumpty said, in rather a scornful tone, "it means just what I choose it to mean - neither more nor less." "The question is," said Alice, "whether you can make words mean so many different things." "The question is," said Humpty Dumpty, "which is to be master - that's all." """; // Note the newline before the closing delimiter String code = """ String empty = ""; """; ``` However, a sequence of three ``` String code = """ String text = """ A text block inside a text block """; """; String tutorial1 = """ A common character in Java programs is """"; String tutorial2 = """ The empty string literal is formed from " characters as follows: """""; System.out.println(""" 1 " 2 "" 3 """ 4 """" 5 """"" 6 """""" 7 """"""" 8 """""""" 9 """"""""" 10 """""""""" 11 """"""""""" 12 """""""""""" """); ``` New escape sequencesTo allow finer control of the processing of newlines and white space, we introduce two new escape sequences. First, the For example, it is common practice to split very long string literals into concatenations of smaller substrings, and then hard wrap the resulting string expression onto multiple lines:
With the
For the simple reason that character literals and traditional string literals don't allow embedded newlines, the Second, the new Escape sequences aren't translated until after incidental space stripping, so
The Concatenation of text blocksText blocks can be used anywhere a string literal can be used. For example, text blocks and string literals may be concatenated interchangeably:
However, concatenation involving a text block can become rather clunky. Take this text block as a starting point:
Suppose it needs to be changed so that the type of
The white space can be removed manually, but this hurts readability of the quoted code:
A cleaner alternative is to use
Another alternative involves the introduction of a new instance method,
Additional MethodsThe following methods will be added to support text blocks;
AlternativesDo nothingJava has prospered for over 20 years with string literals that required newlines to be escaped. IDEs ease the maintenance burden by supporting automatic formatting and concatenation of strings that span several lines of source code. The Allow a string literal to span multiple linesMulti-line string literals could be introduced in Java simply by allowing line terminators in existing string literals. However, this would do nothing about the pain of escaping Adopt another language's multi-string literalAccording to Brian Goetz:
For JEP 326 (Raw String Literals), we surveyed many modern programming languages and their support for multi-line string literals. The results of these surveys influenced the current proposal, such as the choice of three Do not remove incidental white spaceIf Java introduced multi-line string literals without support for automatically removing incidental white space, then many developers would write a method to remove it themselves, or lobby for the Raw string literalsFor JEP 326 (Raw String Literals), we took a different approach to the problem of denoting strings without escaping newlines and quotes, focusing on the raw-ness of strings. We now believe that this focus was wrong, because while raw string literals could easily span multiple lines of source code, the cost of supporting unescaped delimiters in their content was extreme. This limited the effectiveness of the feature in the multi-line use case, which is a critical one because of the frequency of embedding multi-line (but not truly raw) code snippets in Java programs. A good outcome of the pivot from raw-ness to multi-line-ness was a renewed focus on having a consistent escape language between string literals, text blocks, and related features that may be added in future. TestingTests that use string literals for the creation, interning, and manipulation of instances of Tests should be added to ensure that text blocks can embed Java-in-Java, Markdown-in-Java, SQL-in-Java, and at least one JVM-language-in-Java. |
| Priority | Bug | Summary |
|---|---|---|
| P4 | JDK-8377450 | [11u] Tests using Text Blocks fail to compile |
| Priority | Bug | Summary |
|---|---|---|
| P3 | JDK-8361748 | Enforce limits on the size of an XBM image |
| P3 | JDK-8373727 | New XBM images parser regression: only the first line of the bitmap array is parsed |
| P3 | JDK-8375057 | Update HarfBuzz to 12.3.2 |
| Priority | Bug | Summary |
|---|---|---|
| P3 | JDK-8375063 | Update Libpng to 1.6.54 |
| Priority | Bug | Summary |
|---|---|---|
| P4 | JDK-8286694 | Incorrect argument processing in java launcher |
| Priority | Bug | Summary |
|---|---|---|
| P4 | JDK-8372857 | Improve debuggability of java/rmi/server/RemoteServer/AddrInUse.java test |
| Priority | Bug | Summary |
|---|---|---|
| P3 | JDK-8373476 | (tz) Update Timezone Data to 2025c |
| Priority | Bug | Summary |
|---|---|---|
| P4 | JDK-8337102 | JITTester: Fix breaks in static initialization blocks |
| Priority | Bug | Summary |
|---|---|---|
| P4 | JDK-8366221 | [11u] TestPromotionFromSurvivorToTenuredAfterMinorGC.java javac build fails |
| P4 | JDK-8342175 | MemoryEaterMT fails intermittently with ExceptionInInitializerError |
| P4 | JDK-8305186 | Reference.waitForReferenceProcessing should be more accessible to tests |
| Priority | Bug | Summary |
|---|---|---|
| P3 | JDK-8313770 | jdk/internal/platform/docker/TestSystemMetrics.java fails on Ubuntu |
| P3 | JDK-8303215 | Make thread stacks not use huge pages |
| P4 | JDK-8324861 | Exceptions::wrap_dynamic_exception() doesn't have ResourceMark |
| Priority | Bug | Summary |
|---|---|---|
| P3 | JDK-8224796 | C code is not compiled correctly due to undefined "i386" |
| Priority | Bug | Summary |
|---|---|---|
| P4 | JDK-8336343 | Add more known sysroot library locations for ALSA |
| P4 | JDK-8336342 | Fix known X11 library locations in sysroot |
| Priority | Bug | Summary |
|---|---|---|
| P4 | JDK-8373254 | Bump update version of OpenJDK: 11.0.31 |
| Priority | Bug | Summary |
|---|---|---|
| P3 | JDK-8369282 | Distrust TLS server certificates anchored by Chunghwa ePKI Root CA |
| P3 | JDK-8284047 | Harmonize/Standardize the SSLSocket/SSLEngine/SSLSocketSSLEngine test templates |
| P3 | JDK-8209362 | sun/security/ssl/SSLSocketImpl/ReuseAddr.java failed due to "BindException: Address already in use (Bind failed)" |
| P4 | JDK-8374213 | [11u] [BACKOUT] JDK-8301379 Verify TLS_ECDH_* cipher suites cannot be negotiated |
| P4 | JDK-8263188 | JSSE should fail fast if there isn't supported signature algorithm |
| P4 | JDK-8366817 | test/jdk/javax/net/ssl/TLSCommon/interop/JdkProcServer.java and JdkProcClient.java should not delete logs |
| P4 | JDK-8306014 | Update javax.net.ssl TLS tests to use SSLContextTemplate or SSLEngineTemplate |
| P4 | JDK-8301379 | Verify TLS_ECDH_* cipher suites cannot be negotiated |