Repository navigation
Java class library additions for ParparVM (split from #5980) - #6044
shai-almog wants to merge 43 commits into
Conversation
java.util.function, java.util.stream, java.time, java.text, collections, java.util.concurrent, non-file java.io streams, java.lang members, MessageDigest/SecureRandom, charsets and UUID. Host-backed APIs (files, nio.file, prefs, logging, URL, resource bundles, service loader, modules) are left as on master. JdkHost is a narrow internal hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CoreJdkHost serves the EDT waits, log, secure random, digests and locale number symbols; JavaSE and Android carry a copy of JdkHost for the core. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ibrary Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Developer Guide build artifacts are available for download from this workflow run:
Developer Guide quality checks: |
|
Compared 12 screenshots: 12 matched. |
|
Compared 170 screenshots: 170 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f94e2d35f
ℹ️ 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".
|
Compared 206 screenshots: 206 matched. |
- No object serialization: ObjectInput, ObjectOutput and Externalizable are back to master's empty interfaces in vm/JavaAPI and gone from Ports/CLDC11. - Concurrency reads one monotonic clock (BlockingWait.now, System.nanoTime) for every deadline and delay, so a wall-clock change cannot fire a timed wait or a scheduled task early or late. - A positive timeout under a millisecond is rounded up instead of being due immediately (BlockingWait.millis), at every timed call site. - FutureTask consumes the runner's interrupt only when cancel(true) delivered it; cancel(false) leaves the thread's status alone. - Character: the unassigned Greek code points are not letters. - CoreJdkHost finds the locale's separators between any script's decimal digits, not only ASCII ones. - Bulk checks: sub-millisecond timed get, cancel(false) interrupt status. - CI: copyright exclusions for the Harmony/OpenJDK-derived classes, the backend javadoc run no longer documents the class library's internal com.codename1.impl, CodeQL no longer resolves the JDK's SecureRandom to the device class library's copy, and the flutter-bench size overlay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Compared 185 screenshots: 185 matched. Benchmark ResultsDetailed Performance Metrics
ParparVM vs HotSpot (JDK 25): Windows x64Runner CPU: AMD64 Family 25 Model 1 Stepping 1, AuthenticAMD (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 15% (time) / 15% (RAM) away from its baseline in
Result: no regression |
Flutter vs Codename OneSame application, built both ways: Flutter's AOT compile of the gallery, and the identical Dart source transpiled to Java on Codename One. Lower is better for every metric, so a ratio above 1.00x means Codename One is ahead by that factor. android9 interleaved rounds; host load 0.63, 1.79, 1.57
Compute -- the VM workloads (
Gate: within tolerance against
javascript9 interleaved rounds; host load 2.46, 1.59, 0.7
Compute -- the VM workloads (
Gate: within tolerance against
linux9 interleaved rounds; host load 0.27, 2.97, 2.57
Compute -- the VM workloads (
Gate: OUTSIDE THE BASELINE against
windows9 interleaved rounds
Compute -- the VM workloads (
Gate: within tolerance against
Codename One wins 18 of 18 measured metrics across 4 platform(s). |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 00c805346b
ℹ️ 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".
Cloudflare Preview
|
- Duration.dividedBy is exact past 292 years: the magnitude is divided as an unsigned 128-bit number when the nanosecond count overflows a long. - Character: the unassigned CJK compatibility code points are not letters. - Math.scalb's clamp counts all 53 (24) significand bits, so an extreme negative factor underflows to a signed zero; cbrt scales subnormals. - ScheduledPool saturates a fixed rate's next deadline and consumes only the interrupt cancel(true) delivered. - PrintWriter.checkError reports a wrapped PrintWriter's failure. - Matcher stays exhausted after a zero-width match at the region end. - Bulk checks for each, and MatcherExhaustionTest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb506da229
ℹ️ 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".
|
Compared 185 screenshots: 185 matched. Benchmark ResultsDetailed Performance Metrics
|
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
|
Compared 185 screenshots: 185 matched. Benchmark ResultsDetailed Performance Metrics
ParparVM vs HotSpot (JDK 25): Windows arm64Runner CPU: ARMv8 (64-bit) Family 8 Model D49 Revision 0, MICROSOFT CORPORATION (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 15% (time) / 15% (RAM) away from its baseline in
Result: no regression |
|
Compared 185 screenshots: 185 matched. ParparVM vs HotSpot (JDK 25): Linux x64Runner CPU: AMD EPYC 7763 64-Core Processor (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 15% (time) / 15% (RAM) away from its baseline in
Result: no regression |
|
Compared 185 screenshots: 185 matched. ParparVM vs HotSpot (JDK 25): Linux arm64Runner CPU: Neoverse-N2 (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 15% (time) / 15% (RAM) away from its baseline in
Result: no regression |
- tanh: Lambert continued fraction for |x| < 1 (within 1.05 ulp). - String(byte[], int, int, ...): range checked before the native reads it. - Pool: a worker thread that fails to start gives its slot back. - Character: CJK extension ranges split at their unassigned gaps. - Recalibrate the Linux flutter size row and the windows-arm64 hello RAM row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Character.isDigit() admits non-ASCII numerals and the runtime's numeric parsers accept them, so inputs such as Duration.parse("PT١S") succeed even though ISO-8601 duration syntax and the JDK parser reject them. Check explicitly for '0' through '9' in both the whole-number and fractional scans.
ℹ️ 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".
✅ ByteCodeTranslator Quality ReportTest & Coverage
Benchmark Results
Static Analysis
Generated automatically by the PR CI workflow. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
CodenameOne/vm/JavaAPI/src/java/util/Map.java
Lines 311 to 313 in d7d8d7c
For maps that permit null values, this treats a present mapping to null as absent. For example, after map.put("k", null), map.getOrDefault("k", "fallback") returns "fallback" instead of null, so callers cannot distinguish an explicit null mapping as required by the Map contract. Check containsKey(key) when get(key) returns null before selecting the default.
ℹ️ 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".
…ages OOOO and ZZZZ parse only the full localized offset (GMT+08:00), as the JDK does. Int/Long/DoubleSummaryStatistics print the JDK's summary. A CompletableFuture dependent completed by hand skips its action. A reversed view hands bulk changes to the backing list, so an unmodifiable one refuses even a no-op. NavigationTest uninstalls its static dispatcher and LocalContinuityTest clears it: one left behind answered a Form for any route and made an unknown route restorable. linux-x64 objectAllocation RAM recorded lower. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a13c5c323e
ℹ️ 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".
…nth, combined stages Instant.parse round-trips Instant.MIN/MAX, N/A fields conflict-check against component fields, a bare Month formats, and thenCombine / applyToEither skip their action once the dependent is done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9cfc0c4601
ℹ️ 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".
…mic addAllAbsent, script letters Word boundaries take counted quantifiers, a day-of-year is checked against the resolved date, the first estimateSize binds a collection spliterator, addAllAbsent publishes once, and the script letter table covers its blocks whole. Records the linux Flutter size and the linux arm64 translator RAM moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e30f5ee0f8
ℹ️ 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".
# Conflicts: # maven/android-compat/src/test/java/com/codename1/androidcompat/testing/AndroidTestSupport.java
…Ui check forLanguageTag reads extended language subtags, ConcurrentHashMap's entry set writes through on add, and the blockUi conformance check expects a second blocking wait only when the join really waits. Records the linux Flutter size and linux x64 translator RAM moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 00fe52783f
ℹ️ 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".
…ppet name clash TemporalUnit.isSupportedBy probes like the JDK instead of recursing, DateFormat.parse fails cleanly at a start past the end, and the Playground's auto-import prefers the one Codename One class when the device library adds a JDK class of the same name (SecureRandom, Temporal). Drops seven doc-snippet baseline entries that now run and records the linux x64 stringBuilding and windows x64 translator moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 011242322e
ℹ️ 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".
…ed throwables Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1fc02a95f1
ℹ️ 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".
…failed build Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d46658974c
ℹ️ 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".
… use defaultExecutor Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 59c57ac8b3
ℹ️ 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".
|
|
||
| /// A pseudo-random double in `[0, 1)`. | ||
| public static double random() { | ||
| return RandomHolder.RANDOM.nextDouble(); |
There was a problem hiding this comment.
Synchronize access to the shared random generator
When multiple threads call Math.random(), they concurrently mutate the single generator here, but this repository's Random.next(int) updates its plain seed field without synchronization (java/util/Random.java, lines 56-58). Calls can therefore lose seed advances or interleave the two advances used by nextDouble(), producing duplicate or incorrectly combined values; synchronize access to this shared instance or make the underlying generator thread-safe.
Useful? React with 👍 / 👎.
| public void setInfinity(String infinity) { | ||
| this.infinity = infinity; |
There was a problem hiding this comment.
Reject null decimal symbol values immediately
When a caller passes null to this setter, the object is corrupted instead of throwing the required NullPointerException; for example, formatting infinity subsequently appends the text "null", while parsing later fails at infinity.length(). Add the same non-null validation already used by setExponentSeparator here and in setNaN, setCurrencySymbol, and setInternationalCurrencySymbol.
Useful? React with 👍 / 👎.
| if (c.isEmpty()) { | ||
| return base.addAll(c); | ||
| } | ||
| return super.addAll(c); |
There was a problem hiding this comment.
Snapshot aliased inputs before adding to a reversed view
When c is this reversed view (or another view backed by the same list), super.addAll(c) iterates a live collection while every add grows that same backing list. For example, list.reversed().addAll(list.reversed()) keeps increasing the iterator's observed size and appending elements until memory is exhausted instead of duplicating the original elements once; snapshot c before mutating the backing list in both overloads.
Useful? React with 👍 / 👎.
| } | ||
| use(newPattern); | ||
| clearGroups(); | ||
| first = -1; |
There was a problem hiding this comment.
Preserve zero-width advancement across usePattern
When usePattern follows a zero-width match, clearing first here discards the state that tells find() to advance past that match. For example, after an empty pattern matches at index 0, switching to another empty pattern makes the next find() match index 0 again instead of index 1; callers that switch patterns after each match can loop forever. Preserve the previous match-width or next-search-position state while invalidating group access.
Useful? React with 👍 / 👎.
Split out of #5980 so the class library can be reviewed and merged on its own. The desktop compatibility layer will rebase onto this.
What is in it
vm/JavaAPI, mirrored as compile stubs inPorts/CLDC11:java.util.function,java.util.stream,java.time(temporal, chrono, format),java.text, collections,java.util.concurrent, non-filejava.iostreams, readers and writers,java.langadditions,MessageDigest/SecureRandom,java.nio.charset,UUID.com.codename1.impl.JdkHost, installed by the ParparVM ports, offering only what those classes cannot do alone. Each member is justified in the class comment:invokeAndBlockStringregex members are rewritten in every build, on every target, tocom.codename1.util.regex.StringRegex. That coversmatches, bothsplitoverloads,replaceAllandreplaceFirst, called directly or through a method reference. There is now one engine everywhere. Previouslymatcheswas not rewritten at all, and the old fallback engine silently treated a bad pattern as literal text. The rule is unconditional by design; see the comment onBytecodeCompliance.createInvocationRewriteRules, which is guarded by tests.theStringRegexRewriteIsUnconditionalandeveryRegexMemberOfStringIsRewritten.matches/splitcases in hellocodenameone'sStringApiTest.Deliberately not in it
ServiceLoader.java.nio.file,java.util.prefs,java.util.logging,URLandResourceBundleare unchanged from master. They will follow as declarations plus build-time rewrites onto Codename One APIs (FileSystemStorage,Preferences,Log), so each behaves the same on every target.Verified locally
BulkConformanceIntegrationTest,JavascriptRuntimeSemanticsTest,CldcJavaApiParityTestandBytecodeComplianceTestpass.@authorand@sincegates pass.🤖 Generated with Claude Code