Skip to content

Commit df12101

Browse files
ctruedenclaude
andcommitted
docs: do not port io.nio
NIOService and DefaultNIOService wrap two JDK calls behind a system-property switch, and have no usages in the scijava or imagej repositories. ByteBufferByteBank has none either, and caps at Integer.MAX_VALUE exactly as ByteArrayByteBank does, so it adds no capability -- only a pluggable allocator such as ByteBuffer::allocateDirect. Since ByteBank itself is ported, a direct-buffer bank is a small class to write when something actually needs one. NB: SCIFIO is the most plausible consumer and could not be checked, there being no local checkout. This completes scijava-io3. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013gJpzGd3ksbME4CN6Tu2ni
1 parent ef68624 commit df12101

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎docs/migration-plan.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,11 @@ No application context required by anything in this phase.
413413
Cancellation is thread interruption instead — see the cancellation
414414
section — so `copy` checks the flag once per block and throws
415415
`InterruptedIOException`.
416-
- Still to port: `io.nio`.
416+
- `io.nio` is **not ported**: `NIOService` wraps two JDK calls and has no
417+
usages, and `ByteBufferByteBank` has none either and caps at
418+
`Integer.MAX_VALUE` just as `ByteArrayByteBank` does, so it adds no
419+
capability. See [migration.md](migration.md). This component is therefore
420+
complete.
417421
- **`scijava-events`** (new, `org.scijava.events`): a clean-room event bus,
418422
no context, designed for typed topics and weak-reference subscribers. Not a
419423
port of the bushe fork — rewriting removes the attribution obligation. The

‎docs/migration.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ A **dropped** row is a successful outcome, not a gap.
100100
| `io.location` | `org.scijava.io3.location`. `LocationService`/`DefaultLocationService` become `Locations`, backed by plain `ServiceLoader`; `LocationResolver` no longer extends `HandlerPlugin` and carries its own `priority()`. `URILocation`'s injected `LogService` was dead code and is gone | ported |
101101
| `ByteBank`, `ByteArrayByteBank` | `org.scijava.io3` | ported |
102102
| `io.handle` | `org.scijava.io3.handle`. `DataHandle` no longer extends `WrapperPlugin`: the contract was `getType()` plus `set`/`get`, now inlined as `locationType()`, `supports`, `set`, `get` and `priority()`. `DataHandleService` becomes `DataHandles`, backed by plain `ServiceLoader`. `DataHandles.copy` reports progress to a `LongConsumer` rather than a `Task`, and so no longer supports cancellation | ported |
103-
| `io.nio` | not yet ported — `ByteBuffer`-backed byte banks | planned |
103+
| `io.nio` | **not ported.** `NIOService`/`DefaultNIOService` wrap two JDK calls (`ByteBuffer.allocate` + `FileChannel.read`, or `FileChannel.map`) behind a system-property switch, and have no usages in the scijava or imagej repositories. `ByteBufferByteBank` also has none, and caps at `Integer.MAX_VALUE` like `ByteArrayByteBank`, so it adds no capability — only a pluggable allocator, e.g. `ByteBuffer::allocateDirect`. `ByteBank` is ported, so a direct-buffer bank is a small class to add when something needs one. NB: SCIFIO was not checked, having no local checkout | dropped |
104104
| `io` (`IOPlugin`, `IOService`, `RecentFileService`) | `scijava-io3` (Phase 1), pending review of what is still used | open |
105105
| `event`, `event.bushe` | `org.scijava.events` — clean-room rewrite, not a port (Phase 1) | planned |
106106
| `parse` | Parsington (`org.scijava.parsington`) | planned |

0 commit comments

Comments
 (0)