{"id":338551,"date":"2022-09-20T21:00:23","date_gmt":"2022-09-20T21:00:23","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=338551"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=338551","title":{"rendered":"<span>\u0412\u044b\u0448\u043b\u0430 Java 19<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u044b\u0448\u043b\u0430 \u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f <a href=\"https:\/\/openjdk.org\/projects\/jdk\/19\/\" rel=\"nofollow noopener noreferrer\">Java 19<\/a>. \u0412 \u044d\u0442\u043e\u0442 \u0440\u0435\u043b\u0438\u0437 \u043f\u043e\u043f\u0430\u043b\u043e \u0431\u043e\u043b\u0435\u0435 <a href=\"https:\/\/builds.shipilev.net\/backports-monitor\/release-notes-19.html\" rel=\"nofollow noopener noreferrer\">\u0434\u0432\u0443\u0445 \u0442\u044b\u0441\u044f\u0447 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0438 7 JEP&#8217;\u043e\u0432<\/a>. Release Notes \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"http:\/\/jdk.java.net\/19\/release-notes\" rel=\"nofollow noopener noreferrer\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f API \u2013 <a href=\"https:\/\/javaalmanac.io\/jdk\/19\/apidiff\/18\/\" rel=\"nofollow noopener noreferrer\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<p>\u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/www.oracle.com\/java\/technologies\/downloads\/\" rel=\"nofollow noopener noreferrer\">Oracle JDK<\/a><\/li>\n<li><a href=\"http:\/\/jdk.java.net\/19\/\" rel=\"nofollow noopener noreferrer\">OpenJDK<\/a><\/li>\n<\/ul>\n<p>\u0412\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a JEP&#8217;\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043f\u0430\u043b\u0438 \u0432 Java 19.<\/p>\n<h3><a href=\"https:\/\/openjdk.org\/jeps\/427\" rel=\"nofollow noopener noreferrer\">\u041f\u0430\u0442\u0442\u0435\u0440\u043d-\u043c\u0430\u0442\u0447\u0438\u043d\u0433 \u0434\u043b\u044f switch (Third Preview) (JEP 427)<\/a><\/h3>\n<p>  <\/p>\n<p>\u041f\u0430\u0442\u0442\u0435\u0440\u043d-\u043c\u0430\u0442\u0447\u0438\u043d\u0433 \u0434\u043b\u044f <code>switch<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 <a href=\"https:\/\/openjdk.org\/jeps\/406\" rel=\"nofollow noopener noreferrer\">\u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 Java 17<\/a> \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 preview \u0438 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u043d\u0430 <a href=\"https:\/\/openjdk.org\/jeps\/420\" rel=\"nofollow noopener noreferrer\">\u0432\u0442\u043e\u0440\u043e\u0435 preview \u0432 Java 18<\/a>, \u0432\u0441\u0451 \u0435\u0449\u0451 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u0441\u0442\u0430\u0442\u0443\u0441\u0435. \u042d\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0432 Java, \u043a\u043e\u0433\u0434\u0430 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u043b\u043e \u0434\u0432\u0443\u0445 \u0440\u0435\u043b\u0438\u0437\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439: \u0440\u0430\u043d\u0435\u0435 \u0432\u0441\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u0434\u0432\u0430 preview.<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0440\u0435\u043b\u0438\u0437\u0435 \u0432 \u043f\u0430\u0442\u0442\u0435\u0440\u043d-\u043c\u0430\u0442\u0447\u0438\u043d\u0433 \u0431\u044b\u043b\u043e \u0432\u043d\u0435\u0441\u0435\u043d\u043e \u0434\u0432\u0430 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043e\u0445\u0440\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b <code>&amp;&amp;<\/code> \u0431\u044b\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b \u043d\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f <code>when<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">\/\/ --enable-preview --release 18: switch (obj) {     case Integer x &amp;&amp; x > 0 -> ...;     default -> ...; }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"java\">\/\/ --enable-preview --release 19: switch (obj) {     case Integer x when x > 0 -> ...;     default -> ...; }<\/code><\/pre>\n<p>\u041e \u043c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/mail.openjdk.org\/pipermail\/amber-spec-experts\/2022-January\/003195.html\" rel=\"nofollow noopener noreferrer\">\u0432 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Amber<\/a>.<\/p>\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0431\u044b\u043b\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0447\u0438\u043d\u0433\u0430 <code>null<\/code>. \u0422\u0435\u043f\u0435\u0440\u044c <code>null<\/code> \u043c\u0430\u0442\u0447\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0432\u0435\u0442\u043a\u0435 <code>case null<\/code> \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043d\u0438 \u0432 \u043a\u0430\u043a\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0442\u043e\u0442\u0430\u043b\u044c\u043d\u044b\u0445:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">\/\/ --enable-preview --release 18: Object obj = null; switch (obj) {     case Object x -> ...; \/\/ matches because total pattern }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"java\">\/\/ --enable-preview --release 19: Object obj = null; switch (obj) {     case Object x -> ...; \/\/ NPE }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"java\">\/\/ --enable-preview --release 19: Object obj = null; switch (obj) {     case null -> ...; \/\/ OK     case Object x -> ...;  }<\/code><\/pre>\n<p>\u041f\u0440\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0442\u0430\u043a\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/mail.openjdk.org\/pipermail\/amber-spec-experts\/2022-January\/003194.html\" rel=\"nofollow noopener noreferrer\">\u0432 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n<h3><a href=\"https:\/\/openjdk.org\/jeps\/405\" rel=\"nofollow noopener noreferrer\">\u041f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0437\u0430\u043f\u0438\u0441\u0435\u0439 (Preview) (JEP 405)<\/a><\/h3>\n<p>  <\/p>\n<p>\u041f\u0430\u0442\u0442\u0435\u0440\u043d-\u043c\u0430\u0442\u0447\u0438\u043d\u0433 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u043c \u0432\u0438\u0434\u043e\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430: \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u0437\u0430\u043f\u0438\u0441\u0435\u0439.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u043d\u044c\u0448\u0435 \u0434\u043b\u044f \u043f\u0430\u0442\u0442\u0435\u0440\u043d-\u043c\u0430\u0442\u0447\u0438\u043d\u0433\u0430 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043f\u043e \u0442\u0438\u043f\u0443 \u0441 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u043c \u0440\u0443\u0447\u043d\u044b\u043c \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">record Point(int x, int y) {}  static void printSum(Object o) {     if (o instanceof Point p) {         int x = p.x();         int y = p.y();         System.out.println(x + y);     } }<\/code><\/pre>\n<p>\u0421 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u043c\u0438 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043a\u043e\u0434 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">static void printSum(Object o) {     if (o instanceof Point(int x, int y)) {         System.out.println(x + y);     } }<\/code><\/pre>\n<p>\u041f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">record Point(int x, int y) {} enum Color { RED, GREEN, BLUE } record ColoredPoint(Point p, Color c) {}  static void printCoordinatesAndColor(ColoredPoint cp) {     if (cp instanceof ColoredPoint(Point(var x, var y), var c)) {         System.out.println(\"x = \" + x);         System.out.println(\"y = \" + y);         System.out.println(\"color = \" + c);     } }<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">static void printObject(Object obj) {     if (obj instanceof Point(var x, var y) p) {         System.out.println(\"point = \" + p);         System.out.println(\"x = \" + x);         System.out.println(\"y = \" + y);     } }<\/code><\/pre>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043e\u0447\u0435\u0442\u0430\u044e\u0442\u0441\u044f \u0441\u043e <code>switch<\/code> \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e JEP&#8217;\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">static void printObject(Object obj) {     switch (obj) {         case Point(var x, var y) when x > 0 &amp;&amp; y > 0 ->             System.out.println(\"Positive point: x = \" + x + \", y = \" + y);         case Point(var x, var y) ->             System.out.println(\"Point: x = \" + x + \", y = \" + y);         default -> System.out.println(\"Other\");     } }<\/code><\/pre>\n<h3><a href=\"https:\/\/openjdk.org\/jeps\/425\" rel=\"nofollow noopener noreferrer\">Virtual Threads (Preview) (JEP 425)<\/a><\/h3>\n<p>  <\/p>\n<p>\u0412 Java \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 preview.<\/p>\n<p>  <\/p>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u0438, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u044b\u043c\u0438 \u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 (\u043c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432). \u042d\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u00ab\u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441 \u2013 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a\u00bb \u0438 \u043d\u0435 \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u0442\u044c \u043a \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u043c\u0443 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/19\/docs\/api\/java.base\/java\/lang\/Thread.html\" rel=\"nofollow noopener noreferrer\"><code>java.lang.Thread<\/code><\/a>, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043f\u043e\u0432\u0435\u0440\u0445 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f JVM, \u043d\u043e \u043d\u0435 \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b (\u043e\u0442\u0441\u044e\u0434\u0430 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u00ab\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435\u00bb). \u041f\u043e\u0442\u043e\u043a, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u043c-\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u0435\u043c. \u0415\u0441\u043b\u0438 \u043f\u043e\u0442\u043e\u043a\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0442\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u043c \u0434\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/19\/docs\/api\/java.base\/java\/util\/concurrent\/ForkJoinPool.html\" rel=\"nofollow noopener noreferrer\"><code>ForkJoinPool<\/code><\/a>. \u041a\u043e\u0433\u0434\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u0442\u043e \u043e\u043d \u0440\u0430\u0437\u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430-\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044f, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0442\u043e\u043a\u0443-\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044e \u043f\u0440\u0438\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443. \u0422\u0430\u043a\u043e\u0439 \u0440\u0435\u0436\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0438 \u043c\u0430\u043b\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043c \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: <code>synchronized<\/code> \u0431\u043b\u043e\u043a\u0438 \u0438 JNI. \u041f\u0440\u0438 \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u0441\u0432\u043e\u0435\u043c\u0443 \u043f\u043e\u0442\u043e\u043a\u0443-\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044e. \u0422\u0430\u043a\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c <code>synchronized<\/code> \u0431\u043b\u043e\u043a\u0438 \u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 JNI, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043e \u0438\u043b\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 API:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/19\/docs\/api\/java.base\/java\/lang\/Thread.Builder.html\" rel=\"nofollow noopener noreferrer\"><code>Thread.Builder<\/code><\/a> \u2013 \u0431\u0438\u043b\u0434\u0435\u0440 \u043f\u043e\u0442\u043e\u043a\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0443\u0442\u0451\u043c \u0432\u044b\u0437\u043e\u0432\u0430 <code>Thread.ofVirtual().name(\"name\").unstarted(runnable)<\/code>.<\/li>\n<li><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/19\/docs\/api\/java.base\/java\/lang\/Thread.html#startVirtualThread(java.lang.Runnable)\" rel=\"nofollow noopener noreferrer\"><code>Thread.startVirtualThread(Runnable)<\/code><\/a> \u2013 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0438 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a.<\/li>\n<li><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/19\/docs\/api\/java.base\/java\/lang\/Thread.html#isVirtual()\" rel=\"nofollow noopener noreferrer\"><code>Thread.isVirtual()<\/code><\/a> \u2013 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043f\u043e\u0442\u043e\u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c.<\/li>\n<li><a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/19\/docs\/api\/java.base\/java\/util\/concurrent\/Executors.html#newVirtualThreadPerTaskExecutor()\" rel=\"nofollow noopener noreferrer\"><code>Executors.newVirtualThreadPerTaskExecutor()<\/code><\/a> \u2013 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043d\u043e\u0432\u044b\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0432 \u0434\u0435\u0431\u0430\u0433\u0433\u0435\u0440\u0435, JVM TI \u0438 Java Flight Recorder.<\/p>\n<p>  <\/p>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f <a href=\"https:\/\/mail.openjdk.org\/pipermail\/announce\/2017-October\/000238.html\" rel=\"nofollow noopener noreferrer\">\u0441 2017 \u0433\u043e\u0434\u0430<\/a> \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <a href=\"https:\/\/openjdk.org\/projects\/loom\/\" rel=\"nofollow noopener noreferrer\">Loom<\/a>.<\/p>\n<h3><a href=\"https:\/\/openjdk.org\/jeps\/428\" rel=\"nofollow noopener noreferrer\">Structured Concurrency (Incubator) (JEP 428)<\/a><\/h3>\n<p>  <\/p>\n<p>\u0415\u0449\u0451 \u043e\u0434\u043d\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c Loom \u0441\u0442\u0430\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 Java \u043d\u043e\u0432\u043e\u0433\u043e API \u0434\u043b\u044f Structured Concurrency.<\/p>\n<p>  <\/p>\n<p>Structured Concurrency \u2013 \u044d\u0442\u043e \u043f\u043e\u0434\u0445\u043e\u0434 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0438\u043c\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0438\u0437 \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c: \u0435\u0441\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0430\u0441\u0449\u0435\u043f\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u044b\u0445 \u043f\u043e\u0434\u0437\u0430\u0434\u0430\u0447, \u0442\u043e \u044d\u0442\u0438 \u043f\u043e\u0434\u0437\u0430\u0434\u0430\u0447\u0438 \u0432\u043e\u0441\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0431\u043b\u043e\u043a\u0435 \u043a\u043e\u0434\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u0412\u0441\u0435 \u043f\u043e\u0434\u0437\u0430\u0434\u0430\u0447\u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e. \u041a\u0430\u0436\u0434\u0430\u044f \u043f\u043e\u0434\u0437\u0430\u0434\u0430\u0447\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0430 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0436\u0438\u0437\u043d\u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u043b\u043e\u043a\u0430 \u043a\u043e\u0434\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0446\u0435\u043d\u0442\u0440\u0435 \u043d\u043e\u0432\u043e\u0433\u043e API \u043a\u043b\u0430\u0441\u0441 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/19\/docs\/api\/jdk.incubator.concurrent\/jdk\/incubator\/concurrent\/StructuredTaskScope.html\" rel=\"nofollow noopener noreferrer\"><code>StructuredTaskScope<\/code><\/a>. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <code>StructuredTaskScope<\/code>, \u0433\u0434\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0434\u0432\u0435 \u043f\u043e\u0434\u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u0434\u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">try (var scope = new StructuredTaskScope.ShutdownOnFailure()) {     Future&lt;String> user = scope.fork(() -> findUser());     Future&lt;Integer> order = scope.fork(() -> fetchOrder());      scope.join();           \/\/ Join both forks     scope.throwIfFailed();  \/\/ ... and propagate errors      return new Response(user.resultNow(), order.resultNow()); }<\/code><\/pre>\n<p>\u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>ExecutorService<\/code> \u0438 <code>submit()<\/code>, \u043d\u043e \u0443 <code>StructuredTaskScope<\/code> \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0442\u043b\u0438\u0447\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u043a\u043e\u0434 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0412\u0440\u0435\u043c\u044f \u0436\u0438\u0437\u043d\u0438 \u0432\u0441\u0435\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u043f\u043e\u0434\u0437\u0430\u0434\u0430\u0447 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u043b\u043e\u043a\u0430 <code>try-with-resources<\/code>. \u041c\u0435\u0442\u043e\u0434 <code>close()<\/code> \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0442\u0441\u044f \u0432\u0441\u0435 \u043f\u043e\u0434\u0437\u0430\u0434\u0430\u0447\u0438.<\/li>\n<li>\u0415\u0441\u043b\u0438 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 <code>findUser()<\/code> \u0438 <code>fetchOrder()<\/code> \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u043e\u0439, \u0442\u043e \u0434\u0440\u0443\u0433\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0435\u0441\u043b\u0438 \u0435\u0449\u0451 \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430 (\u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 <code>ShutdownOnFailure<\/code>, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0434\u0440\u0443\u0433\u0438\u0435).<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f <code>join()<\/code>, \u0442\u043e \u043e\u0431\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 <code>findUser()<\/code> \u0438 <code>fetchOrder()<\/code> \u043e\u0442\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f.<\/li>\n<li>\u0412 \u0434\u0430\u043c\u043f\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043d\u0430 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044f: \u043f\u043e\u0442\u043e\u043a\u0438, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0435 <code>findUser()<\/code> \u0438 <code>fetchOrder()<\/code>, \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u0434\u043b\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430.<\/li>\n<\/ul>\n<p>\u041d\u043e\u0432\u043e\u0435 API \u0434\u043e\u043b\u0436\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u043c\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u043e\u043c\u0443 \u043f\u043e\u0434\u0445\u043e\u0434\u0443. \u041f\u043e\u043a\u0430 API \u0438\u043c\u0435\u0435\u0442 \u0438\u043d\u043a\u0443\u0431\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u0442\u0430\u0442\u0443\u0441, \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/19\/docs\/api\/jdk.incubator.concurrent\/module-summary.html\" rel=\"nofollow noopener noreferrer\"><code>jdk.incubator.concurrent<\/code><\/a> \u0438 \u043e\u0434\u043d\u043e\u0438\u043c\u0451\u043d\u043d\u043e\u043c \u043f\u0430\u043a\u0435\u0442\u0435.<\/p>\n<h3><a href=\"https:\/\/openjdk.org\/jeps\/424\" rel=\"nofollow noopener noreferrer\">Foreign Function &amp; Memory API (Preview) (JEP 424)<\/a><\/h3>\n<p>  <\/p>\n<p>Foreign Function &amp; Memory API, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u044b\u043b\u043e \u0432 \u0438\u043d\u043a\u0443\u0431\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0441\u0442\u0430\u0442\u0443\u0441\u0435 <a href=\"https:\/\/openjdk.org\/jeps\/412\" rel=\"nofollow noopener noreferrer\">\u0432 Java 17<\/a> \u0438 <a href=\"https:\/\/openjdk.org\/jeps\/419\" rel=\"nofollow noopener noreferrer\">Java 18<\/a>, \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0442\u0430\u043b\u043e Preview API. \u041e\u043d\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u043a\u0435\u0442\u0435 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/19\/docs\/api\/java.base\/java\/lang\/foreign\/package-summary.html\" rel=\"nofollow noopener noreferrer\"><code>java.lang.foreign<\/code><\/a>.<\/p>\n<h3><a href=\"https:\/\/openjdk.org\/jeps\/426\" rel=\"nofollow noopener noreferrer\">Vector API (Fourth Incubator) (JEP 426)<\/a><\/h3>\n<p>  <\/p>\n<p>\u0412\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 API, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u0432 \u0438\u043d\u043a\u0443\u0431\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0441\u0442\u0430\u0442\u0443\u0441\u0435 \u0442\u0440\u0438 \u0440\u0435\u043b\u0438\u0437\u0430 (<a href=\"https:\/\/openjdk.org\/jeps\/338\" rel=\"nofollow noopener noreferrer\">Java 16<\/a>, <a href=\"https:\/\/openjdk.org\/jeps\/414\" rel=\"nofollow noopener noreferrer\">Java 17<\/a>, <a href=\"https:\/\/openjdk.org\/jeps\/417\" rel=\"nofollow noopener noreferrer\">Java 18<\/a>), \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0432 \u043d\u0451\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f. \u041f\u043e\u043a\u0430 API \u043d\u0435 \u0432\u044b\u0439\u0434\u0435\u0442 \u0438\u0437 \u0438\u043d\u043a\u0443\u0431\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0430, \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 <a href=\"https:\/\/docs.oracle.com\/en\/java\/javase\/19\/docs\/api\/jdk.incubator.vector\/module-summary.html\" rel=\"nofollow noopener noreferrer\"><code>jdk.incubator.vector<\/code><\/a>.<\/p>\n<h3><a href=\"https:\/\/openjdk.org\/jeps\/422\" rel=\"nofollow noopener noreferrer\">Linux\/RISC-V Port (JEP 422)<\/a><\/h3>\n<p>  <\/p>\n<p>JDK \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e\u0434 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 Linux\/RISC-V.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>Java 19 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f LTS-\u0440\u0435\u043b\u0438\u0437\u043e\u043c \u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0442 Oracle \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0433\u043e\u0434\u0430 (\u0434\u043e \u043c\u0430\u0440\u0442\u0430 2023 \u0433\u043e\u0434\u0430). \u041e\u0434\u043d\u0430\u043a\u043e Azul \u043e\u0431\u0435\u0449\u0430\u0435\u0442 \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f Zulu \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c <a href=\"https:\/\/www.azul.com\/products\/azul-support-roadmap\/\" rel=\"nofollow noopener noreferrer\">\u0434\u043e \u043c\u0430\u0440\u0442\u0430 2025 \u0433\u043e\u0434\u0430<\/a> (2.5 \u0433\u043e\u0434\u0430).<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/689344\/\"> https:\/\/habr.com\/ru\/post\/689344\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u044b\u0448\u043b\u0430 \u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f <a href=\"https:\/\/openjdk.org\/projects\/jdk\/19\/\" rel=\"nofollow noopener noreferrer\">Java 19<\/a>. \u0412 \u044d\u0442\u043e\u0442 \u0440\u0435\u043b\u0438\u0437 \u043f\u043e\u043f\u0430\u043b\u043e \u0431\u043e\u043b\u0435\u0435 <a href=\"https:\/\/builds.shipilev.net\/backports-monitor\/release-notes-19.html\" rel=\"nofollow noopener noreferrer\">\u0434\u0432\u0443\u0445 \u0442\u044b\u0441\u044f\u0447 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0438 7 JEP&#8217;\u043e\u0432<\/a>. Release Notes \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"http:\/\/jdk.java.net\/19\/release-notes\" rel=\"nofollow noopener noreferrer\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f API \u2013 <a href=\"https:\/\/javaalmanac.io\/jdk\/19\/apidiff\/18\/\" rel=\"nofollow noopener noreferrer\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-338551","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/338551","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=338551"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/338551\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=338551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=338551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=338551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}