Skip to content

Replace runtime panics with the matching Java exceptions - #174

Merged
dlunch merged 2 commits into
mainfrom
fix-normal-path-panics
Jul 16, 2026
Merged

Replace runtime panics with the matching Java exceptions#174
dlunch merged 2 commits into
mainfrom
fix-normal-path-panics

Conversation

@dlunch

Copy link
Copy Markdown
Owner

Summary

An audit of every unwrap() in the runtime found panics reachable from ordinary Java code — starting from File.length() crashing on a file that simply doesn't exist. Each is replaced with the exception (or return value) the JDK produces; expected outputs for all new fixtures are generated by running them on a real JVM.

Fixes

File / streams

  • File.length() returns 0 for a missing file (spec) instead of panicking; isDirectory/isFile drop their guard-then-unwrap shape.
  • FileImpl in the native runtime panicked on any failing open, so the existing FileNotFoundException guards in FileInputStream/RandomAccessFile were unreachable. It now maps open/read/write/seek failures to IOError (new Io variant), FileOutputStream gains the same guard, and all file I/O operations (read, write, seek, available, length, setLength, getFilePointer) throw java.io.IOException on failure via a shared helper.

Class.forName

  • Panicked for any class not already loaded (it only consulted the registry). It now resolves (loads) the class and throws ClassNotFoundException (new runtime class, extends Exception per the 1.2 hierarchy) when resolution fails.

Unpaired surrogates

  • StringBuffer.append(char) / append(char[],int,int) panicked on an unpaired surrogate. The internal append is now UTF-16-based, so building a surrogate pair char by char produces the correct string; String.valueOf(char) constructs through [C for the same reason; PrintStream.println(char) replaces an unpaired surrogate with ? matching the JDK charset encoder.

Zip

  • new ZipFile(...) on a non-zip file panicked in ZipArchive::new. The constructor now validates the archive (matching the JDK's timing) and throws java.util.zip.ZipException (new runtime class, extends IOException); getInputStream returns null for an entry not in the archive.

Not converted (audited, intentionally left)

  • Interpreter stack pops, thread-attach lookups, guarded unwraps — invariants.
  • Uncaught-exception stack-trace printing in Thread — error path of the error path, inside a spawn closure.
  • GregorianCalendar on out-of-range fields — the correct behavior is lenient normalization (a feature), not an exception.
  • ClassInfo::parse on a malformed classfile — needs ClassFormatError plumbing through jvm-less sync code (existing TODO).

Test plan

E2E fixtures with real-JVM-generated expected output, each verified to fail before its fix: FileLength (missing-file length/exists), FileErrors (FileNotFoundException from FileInputStream/FileOutputStream/RandomAccessFile), ForName (loads java.util.Vector, ClassNotFoundException for an unknown name), SurrogateChars (pair building, lone-surrogate length/println), ZipCorrupt (ZipException from the constructor). cargo test --workspace green, fmt clean, clippy no new warnings.

An unwrap audit found panics reachable from ordinary Java code:
- File.length() returns 0 for a missing file; isDirectory/isFile lose
their guard-then-unwrap shape
- FileImpl (native runtime) maps open/read/write/seek failures to
IOError instead of panicking, so FileInputStream and RandomAccessFile
guards actually produce FileNotFoundException; FileOutputStream gains
the same guard
- File I/O operations (read/write/seek/available/length/setLength)
throw java.io.IOException on failure via a shared helper
- Class.forName resolves the class and throws ClassNotFoundException
(new runtime class) instead of panicking on any not-yet-loaded name
- StringBuffer.append(char)/append(char[]) keep exact UTF-16 units so
unpaired surrogates no longer panic and pairs built char by char
survive; String.valueOf(char) builds through [C for the same reason
- PrintStream.println(char) replaces an unpaired surrogate with '?'
like the JDK charset encoder
- ZipFile validates the archive in its constructor and throws
java.util.zip.ZipException (new runtime class) for a malformed
archive; getInputStream returns null for a missing entry
Expected outputs for the new fixtures are generated by a real JVM.
Remaining unwraps are invariants (interpreter stack discipline, thread
attach), guarded lookups, or documented gaps (lenient calendar
normalization, ClassFormatError plumbing).
CopilotAI review requested due to automatic review settings July 16, 2026 05:20
@codecov

codecovBot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.94215% with 40 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.89%. Comparing base (62cf0c6) to head (760e734).
⚠️ Report is 1 commits behind head on main.

Files with missing linesPatch %Lines
..._runtime/src/classes/java/io/random_access_file.rs5.88%16 Missing ⚠️
..._runtime/src/classes/java/io/file_output_stream.rs50.00%6 Missing ⚠️
...src/classes/java/lang/class_not_found_exception.rs80.00%5 Missing ⚠️
...runtime/src/classes/java/util/zip/zip_exception.rs80.00%5 Missing ⚠️
...a_runtime/src/classes/java/io/file_input_stream.rs50.00%4 Missing ⚠️
java_runtime/src/classes/java/io/file.rs33.33%2 Missing ⚠️
java_runtime/src/classes/java/util/zip/zip_file.rs83.33%2 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #174 +/- ##
==========================================
+ Coverage 83.71% 83.89% +0.18% 
==========================================
Files 171 173 +2 Lines 12867 12939 +72 ==========================================
+ Hits 10771 10855 +84 + Misses 2096 2084 -12 

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens the RustJava runtime by removing panic paths reachable from ordinary Java code and mapping failures to the Java exceptions/behaviors that the JDK produces, with new E2E fixtures whose expected outputs were generated from a reference JVM.

Changes:

  • Replace unwrap()-based runtime panics in file I/O, class loading, surrogate handling, and zip handling with JDK-aligned exceptions/return values.
  • Add runtime classes java.lang.ClassNotFoundException and java.util.zip.ZipException and wire them into the runtime loader.
  • Add new Java fixtures and golden outputs covering missing files, I/O errors, Class.forName, surrogate chars, and corrupt zip behavior.

Reviewed changes

Copilot reviewed 28 out of 33 changed files in this pull request and generated 4 comments.

Show a summary per file
FileDescription
test_data/ZipCorrupt.txtGolden output for corrupt/non-zip ZipFile constructor behavior.
test_data/SurrogateChars.txtGolden output for surrogate-pair and lone-surrogate behaviors.
test_data/src/ZipCorrupt.javaFixture exercising ZipFile constructor throwing ZipException.
test_data/src/SurrogateChars.javaFixture exercising surrogate pair construction and lone surrogate printing.
test_data/src/ForName.javaFixture exercising Class.forName success + ClassNotFoundException.
test_data/src/FileLength.javaFixture for File.exists() + File.length() on missing file.
test_data/src/FileErrors.javaFixture for FileNotFoundException from common file I/O constructors.
test_data/ForName.txtGolden output for Class.forName fixture.
test_data/FileLength.txtGolden output for missing-file File.length() returning 0.
test_data/FileErrors.txtGolden output for missing-file/dir constructor failures.
src/runtime/io.rsReplace several I/O unwrap()s with IOError propagation in the native runtime file impls.
src/runtime.rsChange runtime open() to return an IOError instead of panicking on open failure.
java_runtime/src/runtime/io.rsAdd IOError::Io variant for non-NotFound I/O failures.
java_runtime/src/loader.rsRegister new runtime classes (ClassNotFoundException, ZipException).
java_runtime/src/classes/java/util/zip/zip_file.rsConvert zip parsing/entry access panics into ZipException and JDK-like null returns.
java_runtime/src/classes/java/util/zip/zip_exception.rsAdd java.util.zip.ZipException runtime class (extends IOException).
java_runtime/src/classes/java/util/zip.rsExport ZipException module/type from java.util.zip.
java_runtime/src/classes/java/lang/string.rsPreserve unpaired surrogates in String.valueOf(char) by constructing via [C.
java_runtime/src/classes/java/lang/string_buffer.rsSwitch internal appends to UTF-16-based append to preserve unpaired surrogates.
java_runtime/src/classes/java/lang/class.rsMake Class.forName resolve/load and throw ClassNotFoundException instead of panicking.
java_runtime/src/classes/java/lang/class_not_found_exception.rsAdd java.lang.ClassNotFoundException runtime class (extends Exception).
java_runtime/src/classes/java/lang.rsExport ClassNotFoundException from java.lang module.
java_runtime/src/classes/java/io/random_access_file.rsRoute file op failures through shared checked() helper instead of unwrap().
java_runtime/src/classes/java/io/print_stream.rsAvoid panicking on surrogate char printing; replace with ?.
java_runtime/src/classes/java/io/input_stream_reader.rsPropagate array-buffer read failures instead of unwrapping.
java_runtime/src/classes/java/io/file.rsMake File.isDirectory/isFile/length avoid unwraps and match JDK missing-file behavior.
java_runtime/src/classes/java/io/file_output_stream.rsAdd open guard for FileOutputStream and propagate write failures as IOException.
java_runtime/src/classes/java/io/file_input_stream.rsPropagate read/available failures as IOException via checked().
java_runtime/src/classes/java/io.rsAdd shared checked() helper to convert runtime I/O failures into java.io.IOException.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadsrc/runtime/io.rs
Comment threadsrc/runtime/io.rs
Comment threadsrc/runtime/io.rs
Comment threadsrc/runtime.rs
@dlunch
dlunch merged commit fe5d116 into mainJul 16, 2026
9 of 10 checks passed
@dlunch
dlunch deleted the fix-normal-path-panics branch July 16, 2026 05:24

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:cbba0fe4e0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Ok(class.into())
match jvm.resolve_class(&qualified_name).await {
Ok(class) => Ok(class.java_class().into()),
Err(_) => Err(jvm.exception("java/lang/ClassNotFoundException", &rust_name).await),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve linkage errors from Class.forName

When the requested class file is present but resolving one of its superclasses or interfaces fails, resolve_class propagates that Java error (for example NoClassDefFoundError from jvm/src/jvm.rs when a dependency is missing). This blanket Err(_) converts those linkage failures into ClassNotFoundException, so Java code can incorrectly catch them as CNFE instead of seeing the linkage error that Class.forName should propagate. Only the actual “requested class not found” case should be remapped here; other resolve_class errors should be returned unchanged.

Useful? React with 👍 / 👎.

Jun025 added a commit to Jun025/RustJava that referenced this pull request Jul 31, 2026
Judged the two remaining remote branches on the fork:
- dependabot/cargo/tracing-attributes-0.1.31: deleted. PR #4 (fa92ef9)
removed the tracing-attributes direct dependency outright, so the
branch patches a Cargo.toml line that no longer exists.
- wie-ktf-hardening: preserved. 8 of its 12 commits are already in
upstream/main via squash merges (dlunch#174dlunch#175dlunch#176dlunch#177dlunch#180dlunch#182);
git cherry missed this because origin/main trails upstream/main by
20 commits. 4 commits carry residual value.
No code changes.
Co-authored-by: jun0 <junyoung.choi.a@miraeasset.com>
Co-authored-by: Claude <noreply@anthropic.com>
Jun025 added a commit to Jun025/RustJava that referenced this pull request Aug 17, 2026
…am-sync-s1-tracing-cut-1f356ae]
* Bump bytemuck from 1.25.0 to 1.25.1 (dlunch#173)
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.25.0 to 1.25.1.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](Lokathor/bytemuck@v1.25.0...v1.25.1)
---
updated-dependencies:
- dependency-name: bytemuck
dependency-version: 1.25.1
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Replace runtime panics with the matching Java exceptions (dlunch#174)
* Replace runtime panics with the matching Java exceptions
An unwrap audit found panics reachable from ordinary Java code:
- File.length() returns 0 for a missing file; isDirectory/isFile lose
their guard-then-unwrap shape
- FileImpl (native runtime) maps open/read/write/seek failures to
IOError instead of panicking, so FileInputStream and RandomAccessFile
guards actually produce FileNotFoundException; FileOutputStream gains
the same guard
- File I/O operations (read/write/seek/available/length/setLength)
throw java.io.IOException on failure via a shared helper
- Class.forName resolves the class and throws ClassNotFoundException
(new runtime class) instead of panicking on any not-yet-loaded name
- StringBuffer.append(char)/append(char[]) keep exact UTF-16 units so
unpaired surrogates no longer panic and pairs built char by char
survive; String.valueOf(char) builds through [C for the same reason
- PrintStream.println(char) replaces an unpaired surrogate with '?'
like the JDK charset encoder
- ZipFile validates the archive in its constructor and throws
java.util.zip.ZipException (new runtime class) for a malformed
archive; getInputStream returns null for a missing entry
Expected outputs for the new fixtures are generated by a real JVM.
Remaining unwraps are invariants (interpreter stack discipline, thread
attach), guarded lookups, or documented gaps (lenient calendar
normalization, ClassFormatError plumbing).
* Inline the IOException conversion at each I/O call site
* Return the same Thread object from Thread.currentThread() (dlunch#175)
Every attached thread now owns its java/lang/Thread instance: attach
takes the instance for threads started via Thread.start (so
currentThread() inside run() is the started Thread object) and creates
one otherwise (bootstrap, external attachers). currentThread() returns
the stored instance, and the GC roots it per thread.
Also parse unrecognized classfile attributes as an opaque Unknown
variant instead of failing — JVMS 4.7.1 requires silently ignoring
them, and the anonymous-class fixture carries EnclosingMethod and
Signature attributes the parser rejected.
Expected output for the fixture is generated by a real JVM.
* Add Java primitive wrapper classes (dlunch#176)
* Add Java primitive wrapper classes
* Use Character digit semantics for numeric parsing
* Bump tokio from 1.52.3 to 1.52.4 (dlunch#179)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.52.3 to 1.52.4.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](tokio-rs/tokio@tokio-1.52.3...tokio-1.52.4)
---
updated-dependencies:
- dependency-name: tokio
dependency-version: 1.52.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* [rustjava-upstream-sync-s1-tracing-cut-1f356ae] docs: record S1 landing (conflicts 2, setProperty descriptor breakage)
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Inseok Lee <git@dlun.ch>
Co-authored-by: jun0 <junyoung.choi.a@miraeasset.com>
Jun025 added a commit to Jun025/RustJava that referenced this pull request Aug 26, 2026
…am-sync-s2]
* Bump bytemuck from 1.25.0 to 1.25.1 (dlunch#173)
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.25.0 to 1.25.1.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](Lokathor/bytemuck@v1.25.0...v1.25.1)
---
updated-dependencies:
- dependency-name: bytemuck
dependency-version: 1.25.1
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Replace runtime panics with the matching Java exceptions (dlunch#174)
* Replace runtime panics with the matching Java exceptions
An unwrap audit found panics reachable from ordinary Java code:
- File.length() returns 0 for a missing file; isDirectory/isFile lose
their guard-then-unwrap shape
- FileImpl (native runtime) maps open/read/write/seek failures to
IOError instead of panicking, so FileInputStream and RandomAccessFile
guards actually produce FileNotFoundException; FileOutputStream gains
the same guard
- File I/O operations (read/write/seek/available/length/setLength)
throw java.io.IOException on failure via a shared helper
- Class.forName resolves the class and throws ClassNotFoundException
(new runtime class) instead of panicking on any not-yet-loaded name
- StringBuffer.append(char)/append(char[]) keep exact UTF-16 units so
unpaired surrogates no longer panic and pairs built char by char
survive; String.valueOf(char) builds through [C for the same reason
- PrintStream.println(char) replaces an unpaired surrogate with '?'
like the JDK charset encoder
- ZipFile validates the archive in its constructor and throws
java.util.zip.ZipException (new runtime class) for a malformed
archive; getInputStream returns null for a missing entry
Expected outputs for the new fixtures are generated by a real JVM.
Remaining unwraps are invariants (interpreter stack discipline, thread
attach), guarded lookups, or documented gaps (lenient calendar
normalization, ClassFormatError plumbing).
* Inline the IOException conversion at each I/O call site
* Return the same Thread object from Thread.currentThread() (dlunch#175)
Every attached thread now owns its java/lang/Thread instance: attach
takes the instance for threads started via Thread.start (so
currentThread() inside run() is the started Thread object) and creates
one otherwise (bootstrap, external attachers). currentThread() returns
the stored instance, and the GC roots it per thread.
Also parse unrecognized classfile attributes as an opaque Unknown
variant instead of failing — JVMS 4.7.1 requires silently ignoring
them, and the anonymous-class fixture carries EnclosingMethod and
Signature attributes the parser rejected.
Expected output for the fixture is generated by a real JVM.
* Add Java primitive wrapper classes (dlunch#176)
* Add Java primitive wrapper classes
* Use Character digit semantics for numeric parsing
* Bump tokio from 1.52.3 to 1.52.4 (dlunch#179)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.52.3 to 1.52.4.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](tokio-rs/tokio@tokio-1.52.3...tokio-1.52.4)
---
updated-dependencies:
- dependency-name: tokio
dependency-version: 1.52.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add CLDC 1.1 core API compatibility (dlunch#177)
* Add CLDC 1.1 core API compatibility
* Fix CI lint and improve CLDC coverage
* Fix array assignability and reader progress
* [rustjava-upstream-sync-s2] docs: record S2 landing (cut af4f6f8, conflicts 5, ancestry restore)
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Inseok Lee <git@dlun.ch>
Co-authored-by: jun0 <junyoung.choi.a@miraeasset.com>
Jun025 added a commit to Jun025/RustJava that referenced this pull request Aug 26, 2026
…m-sync-s3]
* Bump bytemuck from 1.25.0 to 1.25.1 (dlunch#173)
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.25.0 to 1.25.1.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](Lokathor/bytemuck@v1.25.0...v1.25.1)
---
updated-dependencies:
- dependency-name: bytemuck
dependency-version: 1.25.1
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Replace runtime panics with the matching Java exceptions (dlunch#174)
* Replace runtime panics with the matching Java exceptions
An unwrap audit found panics reachable from ordinary Java code:
- File.length() returns 0 for a missing file; isDirectory/isFile lose
their guard-then-unwrap shape
- FileImpl (native runtime) maps open/read/write/seek failures to
IOError instead of panicking, so FileInputStream and RandomAccessFile
guards actually produce FileNotFoundException; FileOutputStream gains
the same guard
- File I/O operations (read/write/seek/available/length/setLength)
throw java.io.IOException on failure via a shared helper
- Class.forName resolves the class and throws ClassNotFoundException
(new runtime class) instead of panicking on any not-yet-loaded name
- StringBuffer.append(char)/append(char[]) keep exact UTF-16 units so
unpaired surrogates no longer panic and pairs built char by char
survive; String.valueOf(char) builds through [C for the same reason
- PrintStream.println(char) replaces an unpaired surrogate with '?'
like the JDK charset encoder
- ZipFile validates the archive in its constructor and throws
java.util.zip.ZipException (new runtime class) for a malformed
archive; getInputStream returns null for a missing entry
Expected outputs for the new fixtures are generated by a real JVM.
Remaining unwraps are invariants (interpreter stack discipline, thread
attach), guarded lookups, or documented gaps (lenient calendar
normalization, ClassFormatError plumbing).
* Inline the IOException conversion at each I/O call site
* Return the same Thread object from Thread.currentThread() (dlunch#175)
Every attached thread now owns its java/lang/Thread instance: attach
takes the instance for threads started via Thread.start (so
currentThread() inside run() is the started Thread object) and creates
one otherwise (bootstrap, external attachers). currentThread() returns
the stored instance, and the GC roots it per thread.
Also parse unrecognized classfile attributes as an opaque Unknown
variant instead of failing — JVMS 4.7.1 requires silently ignoring
them, and the anonymous-class fixture carries EnclosingMethod and
Signature attributes the parser rejected.
Expected output for the fixture is generated by a real JVM.
* Add Java primitive wrapper classes (dlunch#176)
* Add Java primitive wrapper classes
* Use Character digit semantics for numeric parsing
* Bump tokio from 1.52.3 to 1.52.4 (dlunch#179)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.52.3 to 1.52.4.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](tokio-rs/tokio@tokio-1.52.3...tokio-1.52.4)
---
updated-dependencies:
- dependency-name: tokio
dependency-version: 1.52.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add CLDC 1.1 core API compatibility (dlunch#177)
* Add CLDC 1.1 core API compatibility
* Fix CI lint and improve CLDC coverage
* Fix array assignability and reader progress
* Harden JVM runtime correctness (dlunch#180)
* Harden JVM runtime correctness
* Address classfile review findings
* Move class initialization tests to Java fixture
* Separate classfile validation from JVM verification
* Remove ClassFileError re-export
* [rustjava-upstream-sync-s2] docs: record S2 landing (cut af4f6f8, conflicts 5, ancestry restore)
* [rustjava-upstream-sync-s3] docs: record S3 landing (cut 822504b, conflicts 11) + refresh STATE 「다음」
STATE.md ③-0 pointed at rustjava-pr8-claude-md-prune-disposition as top priority on the grounds
that its review.md was missing and gate 2 had stalled. Both are false now: PR #8 is MERGED
(2026-08-18T19:26:08Z -> 00bddf3) and the review reports exist. Item closed, list renumbered,
⑤ operating notes re-measured (open PRs 2 -> 1, dead branch row dropped).
* [rustjava-upstream-sync-s3] docs: record S2 landing (11ef501) and correct the ancestry-axis prediction
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Inseok Lee <git@dlun.ch>
Co-authored-by: jun0 <junyoung.choi.a@miraeasset.com>
Jun025 added a commit to Jun025/RustJava that referenced this pull request Aug 27, 2026
* Bump bytemuck from 1.25.0 to 1.25.1 (dlunch#173)
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.25.0 to 1.25.1.
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](Lokathor/bytemuck@v1.25.0...v1.25.1)
---
updated-dependencies:
- dependency-name: bytemuck
dependency-version: 1.25.1
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Replace runtime panics with the matching Java exceptions (dlunch#174)
* Replace runtime panics with the matching Java exceptions
An unwrap audit found panics reachable from ordinary Java code:
- File.length() returns 0 for a missing file; isDirectory/isFile lose
their guard-then-unwrap shape
- FileImpl (native runtime) maps open/read/write/seek failures to
IOError instead of panicking, so FileInputStream and RandomAccessFile
guards actually produce FileNotFoundException; FileOutputStream gains
the same guard
- File I/O operations (read/write/seek/available/length/setLength)
throw java.io.IOException on failure via a shared helper
- Class.forName resolves the class and throws ClassNotFoundException
(new runtime class) instead of panicking on any not-yet-loaded name
- StringBuffer.append(char)/append(char[]) keep exact UTF-16 units so
unpaired surrogates no longer panic and pairs built char by char
survive; String.valueOf(char) builds through [C for the same reason
- PrintStream.println(char) replaces an unpaired surrogate with '?'
like the JDK charset encoder
- ZipFile validates the archive in its constructor and throws
java.util.zip.ZipException (new runtime class) for a malformed
archive; getInputStream returns null for a missing entry
Expected outputs for the new fixtures are generated by a real JVM.
Remaining unwraps are invariants (interpreter stack discipline, thread
attach), guarded lookups, or documented gaps (lenient calendar
normalization, ClassFormatError plumbing).
* Inline the IOException conversion at each I/O call site
* Return the same Thread object from Thread.currentThread() (dlunch#175)
Every attached thread now owns its java/lang/Thread instance: attach
takes the instance for threads started via Thread.start (so
currentThread() inside run() is the started Thread object) and creates
one otherwise (bootstrap, external attachers). currentThread() returns
the stored instance, and the GC roots it per thread.
Also parse unrecognized classfile attributes as an opaque Unknown
variant instead of failing — JVMS 4.7.1 requires silently ignoring
them, and the anonymous-class fixture carries EnclosingMethod and
Signature attributes the parser rejected.
Expected output for the fixture is generated by a real JVM.
* Add Java primitive wrapper classes (dlunch#176)
* Add Java primitive wrapper classes
* Use Character digit semantics for numeric parsing
* Bump tokio from 1.52.3 to 1.52.4 (dlunch#179)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.52.3 to 1.52.4.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](tokio-rs/tokio@tokio-1.52.3...tokio-1.52.4)
---
updated-dependencies:
- dependency-name: tokio
dependency-version: 1.52.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add CLDC 1.1 core API compatibility (dlunch#177)
* Add CLDC 1.1 core API compatibility
* Fix CI lint and improve CLDC coverage
* Fix array assignability and reader progress
* Harden JVM runtime correctness (dlunch#180)
* Harden JVM runtime correctness
* Address classfile review findings
* Move class initialization tests to Java fixture
* Separate classfile validation from JVM verification
* Remove ClassFileError re-export
* Bump tokio from 1.52.4 to 1.53.0 (dlunch#181)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.52.4 to 1.53.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](tokio-rs/tokio@tokio-1.52.4...tokio-1.53.0)
---
updated-dependencies:
- dependency-name: tokio
dependency-version: 1.53.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Hide classfile errors behind class definition errors
* Delegate null-parent class loading to bootstrap
* Remove duplicate array instance methods
* Add JNI-style global references (dlunch#182)
* Generalize monitor instance arguments
* Add CDC text formatting APIs (dlunch#183)
* Add CDC text formatting APIs
* Add integer number format factories
* Fix text format position handling
* Add CLI classpath options (dlunch#184)
* Add CLI classpath options
* Simplify URL classpath lookup
* Fix platform classpath handling
* Use File path separator for class loading
* Separate RustJar class loading
* [rustjava-upstream-sync-s4] test: widen test_timer_periodic margin 500ms->2000ms (upstream 3296139 slowed TimerThread)
* [rustjava-upstream-sync-s4] docs: record S4 landing (cut 3296139, conflicts 20->2) + S3 landing sha
* [rustjava-upstream-sync-s4] docs: correct the timer finding - chronic boundary test, not a cut regression
The prior wording compared a standalone run on origin/main against parallel full-suite runs on
upstream and called the gap a regression. Matched-condition alternating runs show no difference
(standalone x10: pre 3.5 mean / post 3.5 mean; full-suite x8: no difference). Upstream widened
this same margin in 895d67d (2025-08) and ad8b477 (2025-10), both already ancestors of main,
11 months before e557673 (2026-07) which the prior wording blamed.
sleep 2000 and both conflict resolutions are untouched. Comment-only in .rs; no code change.
* [rustjava-upstream-sync-s4] docs: retarget follow-up (4) - no timer perf regression exists; the open axis is our test's wall-clock dependence
REPORT.md line 27 already said the 'imported upstream regression' framing was wrong, but the
follow-up list 20 lines below still carried it verbatim - and that list is what the next round
tickets from. Retargeted to the axis that does exist (our test design, no upstream sending).
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Inseok Lee <git@dlun.ch>
Co-authored-by: jun0 <junyoung.choi.a@miraeasset.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@dlunch