From 29367b750ce2f73ad8539b9150c9f072b361c089 Mon Sep 17 00:00:00 2001 From: nikhil Date: Sun, 20 Sep 2026 17:10:13 +0530 Subject: [PATCH 1/2] Update README.md- correct type Steam to Stream --- java-24/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-24/README.md b/java-24/README.md index 1704ce8..3485376 100644 --- a/java-24/README.md +++ b/java-24/README.md @@ -12,7 +12,7 @@ To run each example use: `java --enable-preview --source 24 ` * [479](https://openjdk.org/jeps/479) - Remove the Windows 32-bit x86 Port * [483](https://openjdk.org/jeps/483) - Ahead-of-Time Class Loading & Linking * [484](https://openjdk.org/jeps/484) - Class-File API -* [485](https://openjdk.org/jeps/485) - Steam Gatherers +* [485](https://openjdk.org/jeps/485) - Stream Gatherers * [486](https://openjdk.org/jeps/486) - Permanently Disable the Security Manager * [487](https://openjdk.org/jeps/487) - Scoped Values (Fourth Preview) * [488](https://openjdk.org/jeps/488) - Primitive Types in Patterns, instanceof, and switch (Second Preview) From e3840d7bf25d204f123cbb0e8ce494b1c8f28e13 Mon Sep 17 00:00:00 2001 From: nikhil Date: Sun, 20 Sep 2026 17:25:58 +0530 Subject: [PATCH 2/2] Update README.md Typo mistakes --- java-24/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/java-24/README.md b/java-24/README.md index 3485376..1a801c7 100644 --- a/java-24/README.md +++ b/java-24/README.md @@ -67,7 +67,7 @@ To run each example use: `java --enable-preview --source 24 ` * if external resources cannot be used during the training run, we could mock or disable them (it will be loaded just-in-time) * we could use a smoke test to run enough scenarios used by the application, some testing classes will be cached (in the future a filter will be provided) * we should avoid using complete large test suites (unit tests, corner cases, so on) because it will increase the size of the cache with useless classes (scenarios with fewer usage) - * the training run should do similiar things as production run, otherwise the cache will be less useful + * the training run should do similar things as production run, otherwise the cache will be less useful * **Class-File API** * provide standard API for parsing, generating and modifying Java class file * provide standard API that is up to date with the features from current JDK released @@ -82,10 +82,10 @@ To run each example use: `java --enable-preview --source 24 ` * API [`java.lang.classfile`](https://download.java.net/java/early_access/jdk24/docs/api/java.base/java/lang/classfile/package-summary.html) defines three main abstractions: * element: immutable description of some part of class file (instruction, attribute, field, method or an entire class) * builder: each compound element has a builder with methods to help construct the element - * transform: represents a function that takes an element and a builder and mediates how that element is transformed (replaced, droped or passed to another builder) + * transform: represents a function that takes an element and a builder and mediates how that element is transformed (replaced, dropped or passed to another builder) * we can iterate, transform or build elements using streams and Lambdas * we can use `transformClass`, `transformMethod` and `transformCode` to transform an element - * to read a classe we must use `ClassFile`: + * to read a class we must use `ClassFile`: * `ClassModel cm = ClassFile.of().parse(bytes);` * `ClassFile` is an iterable where we can navigates all its elements (fields, methods, etc) using pattern matching (instead of visitor in other libs): * @@ -110,14 +110,14 @@ To run each example use: `java --enable-preview --source 24 ` System.out.println("Method " + mm.methodName().stringValue()); } ``` -* **Steam Gatherers** +* **Stream Gatherers** * promotion to standard without change * **Scoped Values** * re-preview with API changes * removed methods `callWhere` and `runWhere` to make API more fluent * `ScopedValue.where(SCOPE, "my-value").run(() -> {});` instead of `ScopedValue.runWhere(SCOPE, "my-value", () -> {})` * `ScopedValue.where(SCOPE, "my-value").call(() -> {});` instead of `ScopedValue.callWhere(SCOPE, "my-value", () -> {})` - * we can bind multiples values: + * we can bind multiple values: * `ScopedValue.where(SCOPE_A, "my-value").where(SCOPE_B, "other-value").run(() -> {})` * **Primitive Types in Patterns, instanceof, and switch** * re-preview without change @@ -135,8 +135,8 @@ To run each example use: `java --enable-preview --source 24 ` * change the virtual threads to release the platform threads when blocked by synchronized methods and statements * eliminates nearly all cases of virtual threads being pinned to platform thread * scenarios where the virtual threads can be pinned: - * when inside a synchronized block, if it tries to get another object's monitor, the virtual thread is blocked and pinned until it can adquire the monitor - * when it tries to invoke a synchronized method that is already locked by another thread, the virtual thread is pinned and blocked until it can adquire the monitor + * when inside a synchronized block, if it tries to get another object's monitor, the virtual thread is blocked and pinned until it can acquire the monitor + * when it tries to invoke a synchronized method that is already locked by another thread, the virtual thread is pinned and blocked until it can acquire the monitor * the system property `jdk.tracePinnedThreads` was removed * recommendations: * use synchronized where practical, since it is more convenient and less error prone