[jdk11u-dev] RFR: 8329013: StackOverflowError when starting Apache Tomcat with signed jar
Amos Shi
ashi at openjdk.org
Fri Apr 26 20:45:53 UTC 2024
On Fri, 26 Apr 2024 20:31:01 GMT, Amos Shi <ashi at openjdk.org> wrote:
> Backport of [JDK-8329013](https://bugs.openjdk.org/browse/JDK-8329013)
> - This PR contains two commits
> - commit 1: is
> - the original git apply
> - and the `src/java.base/share/classes/jdk/internal/misc/ThreadTracker.java` file needed by this PR
> - The `ThreadTracker.java` class was added by https://github.com/openjdk/jdk/commit/9583e3657e43cc1c6f2101a64534564db2a9bd84 , which is pretty big for `Virtual Threads` and we have no intention to back this change to Java 11 right now
> - So here we simply copy the current code of `ThreadTracker.java` to `jdk11u-dev`
> - commit 2: is
> - Manual merge of `src/java.base/share/classes/jdk/internal/event/EventHelper.java` based on the `EventHelper.java.rej` file. The change to this file can be `considered as clean`.
> - Fix java 11 compile error for `ThreadTracker.java`
>
> Testing
> - Local: Test passed
> - `RecursiveEventHelper.java`: Test results: passed: 1
> - Pipeline:
> - Testing Machine:
src/java.base/share/classes/jdk/internal/misc/ThreadTracker.java line 56:
> 54: public int hashCode() {
> 55: return Long.hashCode(thread.getId());
> 56: }
`threadId()` method does not exit in Java 11 yet
we are using `getId()` method which is doing exactly the same job.
- https://github.com/openjdk/jdk/blame/4018b2b19629ddb8cd7a56e064dfef371f23e5fa/src/java.base/share/classes/java/lang/Thread.java#L2565
@Deprecated(since="19")
public long getId() {
return threadId();
}
public final long threadId() {
return tid;
}
-------------
PR Review Comment: https://git.openjdk.org/jdk11u-dev/pull/2687#discussion_r1581513282
More information about the jdk-updates-dev
mailing list