Skip to content

Add java.util.Locale compatibility runtime - #171

Merged
dlunch merged 2 commits into
mainfrom
codex/java-util-locale
Jun 28, 2026
Merged

Add java.util.Locale compatibility runtime#171
dlunch merged 2 commits into
mainfrom
codex/java-util-locale

Conversation

@dlunch

@dlunch dlunch commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a minimal java.util.Locale runtime class with Java 1.1-style constructors, constants, default locale, accessors, equality, hashCode, clone, toString, and lightweight display/ISO helpers
  • register Locale in the runtime loader and java.util module exports
  • add java_runtime tests for constants, constructors, default locale behavior, null rejection, and unsupported ISO3 handling

Validation

  • cargo test -p java_runtime test_locale
  • previously also ran cargo test -p java_runtime classes::java::util and cargo test during implementation

Copilot AI review requested due to automatic review settings June 28, 2026 05:37
@codecov

codecov Bot commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.98246% with 52 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.71%. Comparing base (1a39271) to head (5054b77).

Files with missing lines Patch % Lines
java_runtime/src/classes/java/util/locale.rs 92.97% 52 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #171      +/-   ##
==========================================
+ Coverage   83.14%   83.71%   +0.56%     
==========================================
  Files         170      171       +1     
  Lines       12126    12867     +741     
==========================================
+ Hits        10082    10771     +689     
- Misses       2044     2096      +52     

☔ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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: 964723ca38

ℹ️ 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".

Comment thread java_runtime/src/classes/java/util/locale.rs Outdated

Copilot AI 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 adds a minimal java.util.Locale runtime implementation to the java_runtime crate, wires it into the runtime class loader, and introduces tests to validate basic Locale behavior in the JVM harness.

Changes:

  • Implement java/util/Locale runtime class (constructors, constants, default locale, accessors, equality/hashCode/clone/toString, and basic ISO/display helpers).
  • Register Locale in the runtime loader and export it from java_runtime::classes::java::util.
  • Add java_runtime tests for Locale constants, constructors, default-locale behavior, null rejection, and unsupported ISO3 handling.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
java_runtime/src/classes/java/util/locale.rs New java.util.Locale runtime class implementation and behavior.
java_runtime/src/loader.rs Registers Locale so it can be resolved/loaded at runtime.
java_runtime/src/classes/java/util.rs Adds locale module + re-exports Locale.
java_runtime/tests/classes/java/util/test_locale.rs New tests for Locale constants/constructors/default/edge cases.
java_runtime/tests/classes/java/util/mod.rs Includes the new test_locale module in the test suite.

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

Comment thread java_runtime/src/classes/java/util/locale.rs
Comment thread java_runtime/src/classes/java/util/locale.rs
@dlunch
dlunch merged commit 4a3a2fd into main Jun 28, 2026
10 checks passed
@dlunch
dlunch deleted the codex/java-util-locale branch June 28, 2026 08:16
Sign up for free to 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