Skip to content
Prev Previous commit
Next Next commit
Remove unused LOG fields, use newSingleThreadExecutor for Java 21 ove…
…rlay, fix empty docs section

Agent-Logs-Url: https://github.com/github/copilot-sdk-java/sessions/46706dd3-402c-41c9-9150-3cfae7db8c3f

Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com>
  • Loading branch information
Copilot and brunoborges authored Apr 7, 2026
commit 9d456f6c69bd719b56ab17818bdd3f603ea0c9a1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.logging.Logger;

/**
* Provides thread factories for the SDK's internal thread creation.
Expand All @@ -24,8 +23,6 @@
*/
final class ThreadFactoryProvider {

private static final Logger LOG = Logger.getLogger(ThreadFactoryProvider.class.getName());

private ThreadFactoryProvider() {
}
Comment thread
brunoborges marked this conversation as resolved.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.logging.Logger;

/**
* Java 21+ override that uses virtual threads for the SDK's internal thread
Expand All @@ -20,8 +19,6 @@
*/
final class ThreadFactoryProvider {

private static final Logger LOG = Logger.getLogger(ThreadFactoryProvider.class.getName());

private ThreadFactoryProvider() {
}
Comment on lines +20 to +23
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOG is declared but never used in this class. Please remove it (and any now-unneeded logging import) to avoid dead code and future confusion.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already addressed in commit 9d456f6 — the unused LOG field and java.util.logging.Logger import were removed from both the baseline and Java 21 overlay ThreadFactoryProvider files.


Expand Down
7 changes: 1 addition & 6 deletions src/site/markdown/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -1262,12 +1262,7 @@ The SDK JAR includes `Multi-Release: true` in its manifest. On Java 21+, the JVM

### Verifying Virtual Thread Usage

You can check at runtime whether the SDK is using virtual threads:

```java
// Thread names are preserved for debuggability regardless of thread type.
// On Java 21+, the jsonrpc-reader and cli-stderr-reader threads will be virtual.
```
Thread names are preserved for debuggability regardless of thread type. On Java 21+, a thread dump will show `jsonrpc-reader` and `cli-stderr-reader` as virtual threads rather than platform threads. You can verify this via `jcmd <pid> Thread.dump_to_file -format=json <file>` or your IDE's thread inspector.

## Next Steps

Expand Down
Loading