Skip to content

Java class library additions for ParparVM (split from #5980) - #6044

Open
shai-almog wants to merge 43 commits into
masterfrom
java-api-additions
Open

shai-almog wants to merge 43 commits into
masterfrom
java-api-additions

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

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

  • Pure-logic JDK API in vm/JavaAPI, mirrored as compile stubs in Ports/CLDC11: java.util.function, java.util.stream, java.time (temporal, chrono, format), java.text, collections, java.util.concurrent, non-file java.io streams, readers and writers, java.lang additions, MessageDigest/SecureRandom, java.nio.charset, UUID.
  • A narrow 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:
    • EDT-safe blocking through invokeAndBlock
    • logging a task that threw
    • random bytes and digests
    • locale number symbols
  • String regex members are rewritten in every build, on every target, to com.codename1.util.regex.StringRegex. That covers matches, both split overloads, replaceAll and replaceFirst, called directly or through a method reference. There is now one engine everywhere. Previously matches was 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 on BytecodeCompliance.createInvocationRewriteRules, which is guarded by tests.
  • Translator and runtime support for the above (natives, JS bindings, record lowering).
  • Tests:
    • Bulk HotSpot-vs-ParparVM conformance checks.
    • theStringRegexRewriteIsUnconditional and everyRegexMemberOfStringIsRewritten.
    • Device-level matches/split cases in hellocodenameone's StringApiTest.

Deliberately not in it

  • No class loaders, modules or ServiceLoader.
  • File, java.nio.file, java.util.prefs, java.util.logging, URL and ResourceBundle are 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

  • JavaAPI, the translator and the full maven install build.
  • BulkConformanceIntegrationTest, JavascriptRuntimeSemanticsTest, CldcJavaApiParityTest and BytecodeComplianceTest pass.
  • SpotBugs reports zero findings on every gated module.
  • The cast-semantics, control-character, @author and @since gates pass.

🤖 Generated with Claude Code

shai-almog and others added 4 commits October 17, 2026 15:07
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>
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T05:19:11.943710Z 59c57ac Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Developer Guide build artifacts are available for download from this workflow run:

Developer Guide quality checks:

  • AsciiDoc linter: No issues found (report)
  • Vale: No alerts found (report)
  • Paragraph capitalization: No paragraph capitalization issues (report)
  • LanguageTool: No grammar matches (report)
  • Image references: No unused images detected (report)

@shai-almog

shai-almog commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 12 screenshots: 12 matched.
✅ JavaSE simulator integration screenshots matched stored baselines.

@shai-almog

shai-almog commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 170 screenshots: 170 matched.

Native Android coverage

  • 📊 Line coverage: 16.02% (26011/162399 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 14.37% (122215/850297), branch 9.91% (8466/85441), complexity 7.81% (6525/83503), method 11.59% (4648/40094), class 19.78% (960/4853)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6367 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/736 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/726 lines covered)
      • okio.okio.Buffer – 0.00% (0/687 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/625 lines covered)
      • com.codename1.androidcompat.rt.com.codename1.androidcompat.rt.TextXmlPullParser – 0.00% (0/623 lines covered)
      • com.codename1.androidcompat.androidx.constraintlayout.core.widgets.com.codename1.androidcompat.androidx.constraintlayout.core.widgets.Flow – 0.00% (0/576 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 16.02% (26011/162399 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 14.37% (122215/850297), branch 9.91% (8466/85441), complexity 7.81% (6525/83503), method 11.59% (4648/40094), class 19.78% (960/4853)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6367 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/736 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/726 lines covered)
      • okio.okio.Buffer – 0.00% (0/687 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/625 lines covered)
      • com.codename1.androidcompat.rt.com.codename1.androidcompat.rt.TextXmlPullParser – 0.00% (0/623 lines covered)
      • com.codename1.androidcompat.androidx.constraintlayout.core.widgets.com.codename1.androidcompat.androidx.constraintlayout.core.widgets.Flow – 0.00% (0/576 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend scalar fallback (no native SIMD)
SIMD int-add (64K x300) java 129ms / native 122ms = 1.0x speedup
SIMD float-mul (64K x300) java 289ms / native 183ms = 1.5x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 93.000 ms
Base64 CN1 decode 83.000 ms
Base64 native encode 422.000 ms
Base64 encode ratio (CN1/native) 0.220x (78.0% faster)
Base64 native decode 268.000 ms
Base64 decode ratio (CN1/native) 0.310x (69.0% faster)
Image encode benchmark status skipped (SIMD unsupported)

@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: 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".

Comment thread CodenameOne/src/com/codename1/impl/CoreJdkHost.java Outdated
Comment thread vm/JavaAPI/src/java/lang/Character.java Outdated
Comment thread vm/JavaAPI/src/java/util/concurrent/FutureTask.java Outdated
Comment thread vm/JavaAPI/src/java/util/concurrent/Delays.java Outdated
Comment thread vm/JavaAPI/src/java/util/concurrent/FutureTask.java Outdated
@shai-almog

shai-almog commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 206 screenshots: 206 matched.
✅ JavaScript-port screenshot tests passed.

shai-almog and others added 2 commits October 17, 2026 19:51
- 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>
@shai-almog

shai-almog commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 185 screenshots: 185 matched.
Native Windows port (x64 / Intel-AMD): full hellocodenameone screenshot suite rendered offscreen with Direct2D/DirectWrite, plus the real benchmarks (base64 native/CN1/SIMD, image createMask/applyMask/modifyAlpha/PNG/JPEG, SSE2 SIMD kernels). Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 66ms / native 5ms = 13.2x speedup
SIMD float-mul (64K x300) java 65ms / native 4ms = 16.2x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 74.000 ms
Base64 CN1 decode 88.000 ms
Base64 SIMD encode 109.000 ms
Base64 encode ratio (SIMD/CN1) 1.473x (47.3% slower)
Base64 SIMD decode 106.000 ms
Base64 decode ratio (SIMD/CN1) 1.205x (20.5% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 12.000 ms
Image createMask (SIMD on) 5.000 ms
Image createMask ratio (SIMD on/off) 0.417x (58.3% faster)
Image applyMask (SIMD off) 33.000 ms
Image applyMask (SIMD on) 29.000 ms
Image applyMask ratio (SIMD on/off) 0.879x (12.1% faster)
Image modifyAlpha (SIMD off) 30.000 ms
Image modifyAlpha (SIMD on) 22.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.733x (26.7% faster)
Image modifyAlpha removeColor (SIMD off) 91.000 ms
Image modifyAlpha removeColor (SIMD on) 20.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.220x (78.0% faster)

ParparVM vs HotSpot (JDK 25): Windows x64

Runner CPU: AMD64 Family 25 Model 1 Stepping 1, AuthenticAMD (baseline windows-x64@amd64-family-25-model-1-authenticamd)

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 vm/selfhost/perf-baseline/ fails: above it is a regression, below it an improvement that has to be rebaselined (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (WinHelloMain) 4 1.35x (base 1.22x, +10.4%) 0.57x (base 0.94x, -39.1%) ok
translator (self) 4 0.73x (base 0.60x, +20.5%) 0.54x (base 0.54x, -0.3%) ok
intArithmetic 4 1.19x (base 1.10x, +8.2%) 0.06x (base 0.06x, +7.8%) ok
longArithmetic 4 1.08x (base 1.08x, +0.0%) 0.06x (base 0.05x, +3.5%) ok
mathTranscendental 4 0.77x (base 0.79x, -2.3%) 0.06x (base 0.06x, +3.0%) ok
arraySequential 4 1.38x (base 1.36x, +1.3%) 0.39x (base 0.39x, +0.6%) ok
arrayRandom 4 1.07x (base 1.06x, +0.9%) 0.23x (base 0.23x, +0.7%) ok
objectAllocation 4 1.54x (base 1.56x, -1.4%) 0.29x (base 0.39x, -23.9%) ok
valueEscape 4 0.10x (base 0.10x, +0.3%) 0.05x (base 0.04x, +4.1%) ok
hashMapChurn 4 1.73x (base 1.80x, -4.0%) 0.09x (base 0.09x, -4.3%) ok
stringBuilding 4 1.32x (base 1.22x, +8.2%) 0.32x (base 0.32x, +0.2%) ok
recursion 4 1.49x (base 1.49x, -0.3%) 0.06x (base 0.06x, +1.6%) ok
quicksort 4 1.13x (base 1.13x, +0.2%) 0.12x (base 0.12x, +1.1%) ok

Result: no regression

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Flutter vs Codename One

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

android

9 interleaved rounds; host load 0.63, 1.79, 1.57

Metric Codename One Flutter Ratio Winner
Installed size 78.2 MB 95.8 MB 1.23x Codename One
Executable code 4.6 MB 20.6 MB 4.43x Codename One
Download size (zipped) 78.2 MB 95.8 MB 1.23x Codename One
Cold start to first frame on screen 406 ms 1588 ms 3.92x Codename One
Memory at rest 45.1 MB 79.4 MB 1.76x Codename One

Start-up and memory at rest are judged round by round: the ratio is the median of the per-round ratios, each from two launches made back to back, and the times and sizes shown are each side's median, so the ratio need not equal their quotient. Codename One was ahead in 9 of 9 rounds on cold start to first frame on screen; 9 of 9 rounds on memory at rest.

Compute -- the VM workloads (vm/benchmarks), run inside each app; time is the best of the app's own repetitions, higher ratio means Codename One is faster.

Workload Codename One Flutter Ratio
intArithmetic 94 ms 252 ms 2.68x
longArithmetic 60 ms 66 ms 1.10x
mathTranscendental 192 ms 317 ms 1.65x
arraySequential 30 ms 43 ms 1.43x
arrayRandom 280 ms 343 ms 1.23x
objectAllocation 94 ms 60 ms 0.64x
valueEscape 8 ms 13 ms 1.62x
hashMapChurn 168 ms 287 ms 1.71x
stringBuilding 115 ms 125 ms 1.09x
recursion 117 ms 299 ms 2.56x
quicksortBench 166 ms 171 ms 1.03x
Geometric mean 1.41x

Gate: within tolerance against scripts/flutter-bench/baseline.

Android sizes are for the arm64-v8a slice a phone is delivered, on both sides; Flutter's release apk carries three ABIs and would otherwise count its engine about three times.
Android start-up and memory come from an x86_64 emulator with a software GPU. They compare the two runtimes on one machine; they are not phone timings, and a renderer that leans on the GPU is penalised more there.
This platform's adapter has not been exercised end to end before; treat the first published run as the thing under review.

javascript

9 interleaved rounds; host load 2.46, 1.59, 0.7

Metric Codename One Flutter Ratio Winner
Installed size 103.8 MB 122.5 MB 1.18x Codename One
Executable code 12.7 MB 25.2 MB 1.98x Codename One
Download size (zipped) 76.3 MB 84.1 MB 1.10x Codename One
Cold start to first frame on screen -- -- -- not measured
Memory at rest -- -- -- not measured

Compute -- the VM workloads (vm/benchmarks), run inside each app; time is the best of the app's own repetitions, higher ratio means Codename One is faster.

Workload Codename One Flutter Ratio
intArithmetic 706 ms wrong result Flutter: wrong result
longArithmetic 5209 ms did not run Flutter: did not run
mathTranscendental 631 ms did not run Flutter: did not run
arraySequential 236 ms 90 ms 0.38x
arrayRandom 990 ms wrong result Flutter: wrong result
objectAllocation 37 ms 28 ms 0.76x
valueEscape 119 ms 8 ms 0.07x
hashMapChurn 979 ms 251 ms 0.26x
stringBuilding 474 ms 110 ms 0.23x
recursion 506 ms 513 ms 1.01x
quicksortBench 446 ms wrong result Flutter: wrong result
Geometric mean 0.33x

Gate: within tolerance against scripts/flutter-bench/baseline; BEHIND FLUTTER on Compute (geomean of the VM workloads) (reported, not gated: a loss to Flutter on the web is currently accepted).

the JavaScript adapter needs a Chrome DevTools driver; sizes are reported and timings are not
This platform's adapter has not been exercised end to end before; treat the first published run as the thing under review.

linux

9 interleaved rounds; host load 0.27, 2.97, 2.57

Metric Codename One Flutter Ratio Winner
Installed size 111.1 MB 143.8 MB 1.29x Codename One
Executable code 13.9 MB 16.1 MB 1.16x Codename One
Download size (zipped) 80.8 MB 92.9 MB 1.15x Codename One
Cold start to first frame on screen 147 ms 250 ms 1.71x Codename One
Memory at rest 82.0 MB 224.0 MB 2.73x Codename One

Start-up and memory at rest are judged round by round: the ratio is the median of the per-round ratios, each from two launches made back to back, and the times and sizes shown are each side's median, so the ratio need not equal their quotient. Codename One was ahead in 9 of 9 rounds on cold start to first frame on screen; 9 of 9 rounds on memory at rest.

Compute -- the VM workloads (vm/benchmarks), run inside each app; time is the best of the app's own repetitions, higher ratio means Codename One is faster.

Workload Codename One Flutter Ratio
intArithmetic 74 ms 183 ms 2.47x
longArithmetic 56 ms 55 ms 0.98x
mathTranscendental 254 ms 276 ms 1.09x
arraySequential 16 ms 35 ms 2.19x
arrayRandom 283 ms 289 ms 1.02x
objectAllocation 23 ms 39 ms 1.70x
valueEscape 5 ms 7 ms 1.40x
hashMapChurn 48 ms 345 ms 7.19x
stringBuilding 32 ms 108 ms 3.38x
recursion 95 ms 256 ms 2.69x
quicksortBench 139 ms 149 ms 1.07x
Geometric mean 1.87x

Gate: OUTSIDE THE BASELINE against scripts/flutter-bench/baseline. To accept the move, download this platform's baseline-<platform>.json artifact and run python3 scripts/flutter-bench/flutter_baseline.py calibrate --pr 6044 --reason "<why these moved>" baseline-linux.json, then commit the overlay it writes.

This platform's adapter has not been exercised end to end before; treat the first published run as the thing under review.

windows

9 interleaved rounds

Metric Codename One Flutter Ratio Winner
Installed size 107.5 MB 121.1 MB 1.13x Codename One
Executable code 11.2 MB 14.1 MB 1.26x Codename One
Download size (zipped) 77.8 MB 86.4 MB 1.11x Codename One
Cold start to first frame on screen 157 ms 261 ms 1.65x Codename One
Memory at rest 58.0 MB 92.6 MB 1.60x Codename One

Start-up and memory at rest are judged round by round: the ratio is the median of the per-round ratios, each from two launches made back to back, and the times and sizes shown are each side's median, so the ratio need not equal their quotient. Codename One was ahead in 9 of 9 rounds on cold start to first frame on screen; 9 of 9 rounds on memory at rest.

Compute -- the VM workloads (vm/benchmarks), run inside each app; time is the best of the app's own repetitions, higher ratio means Codename One is faster.

Workload Codename One Flutter Ratio
intArithmetic 80 ms 193 ms 2.41x
longArithmetic 60 ms 57 ms 0.95x
mathTranscendental 199 ms 268 ms 1.35x
arraySequential 10 ms 35 ms 3.50x
arrayRandom 253 ms 372 ms 1.47x
objectAllocation 25 ms 39 ms 1.56x
valueEscape 1 ms 7 ms 7.00x
hashMapChurn 47 ms 322 ms 6.85x
stringBuilding 34 ms 121 ms 3.56x
recursion 200 ms 264 ms 1.32x
quicksortBench 143 ms 148 ms 1.03x
Geometric mean 2.20x

Gate: within tolerance against scripts/flutter-bench/baseline. Smaller than its baseline, which does not fail the gate: Executable code -11.70%; Installed size -1.37%; Download size (zipped) -0.89% -- rebaseline to tighten. To accept the move, download this platform's baseline-<platform>.json artifact and run python3 scripts/flutter-bench/flutter_baseline.py calibrate --pr 6044 --reason "<why these moved>" baseline-windows.json, then commit the overlay it writes.

This platform's adapter has not been exercised end to end before; treat the first published run as the thing under review.

Codename One wins 18 of 18 measured metrics across 4 platform(s).

@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 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".

Comment thread vm/JavaAPI/src/java/time/Duration.java Outdated
Comment thread vm/JavaAPI/src/java/lang/Character.java Outdated
Comment thread vm/JavaAPI/src/java/lang/Math.java
Comment thread vm/JavaAPI/src/java/lang/Math.java
Comment thread vm/JavaAPI/src/java/util/concurrent/ScheduledPool.java Outdated
Comment thread vm/JavaAPI/src/java/util/concurrent/ScheduledPool.java
Comment thread vm/JavaAPI/src/java/io/PrintWriter.java
Comment thread CodenameOne/src/com/codename1/util/regex/Matcher.java
@github-actions

Copy link
Copy Markdown
Contributor

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>
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 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".

Comment thread vm/JavaAPI/src/java/lang/Character.java Outdated
Comment thread vm/JavaAPI/src/java/util/concurrent/Executors.java Outdated
Comment thread vm/ByteCodeTranslator/src/nativeMethods.m
Comment thread vm/JavaAPI/src/java/lang/Math.java Outdated
Comment thread vm/JavaAPI/src/java/lang/String.java Outdated
@shai-almog

shai-almog commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 185 screenshots: 185 matched.
Native Windows port, REAL shipping pipeline: the hellocodenameone screenshot suite rendered by a binary CROSS-COMPILED on Linux (clang-cl + xwin, WebView2 linked) and RUN on a Windows x64 runner. Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 63ms / native 6ms = 10.5x speedup
SIMD float-mul (64K x300) java 56ms / native 5ms = 11.2x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 73.000 ms
Base64 CN1 decode 89.000 ms
Base64 SIMD encode 112.000 ms
Base64 encode ratio (SIMD/CN1) 1.534x (53.4% slower)
Base64 SIMD decode 105.000 ms
Base64 decode ratio (SIMD/CN1) 1.180x (18.0% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 8.000 ms
Image createMask (SIMD on) 2.000 ms
Image createMask ratio (SIMD on/off) 0.250x (75.0% faster)
Image applyMask (SIMD off) 26.000 ms
Image applyMask (SIMD on) 32.000 ms
Image applyMask ratio (SIMD on/off) 1.231x (23.1% slower)
Image modifyAlpha (SIMD off) 32.000 ms
Image modifyAlpha (SIMD on) 19.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.594x (40.6% faster)
Image modifyAlpha removeColor (SIMD off) 32.000 ms
Image modifyAlpha removeColor (SIMD on) 12.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.375x (62.5% faster)

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ Continuous Quality Report

Test & Coverage

Static Analysis

  • SpotBugs [Report archive]
    • ✅ ByteCodeTranslator: 0 findings (no issues)
    • ✅ android: 0 findings (no issues)
    • ✅ android-compat: 0 findings (no issues)
    • ✅ android-res-compiler: 0 findings (no issues)
    • ✅ backend: 0 findings (no issues)
    • ✅ backend-test: 0 findings (no issues)
    • ✅ build-engine: 0 findings (no issues)
    • ✅ build-hint-catalog: 0 findings (no issues)
    • ✅ build-hint-tools: 0 findings (no issues)
    • ✅ codenameone-gradle-plugin: 0 findings (no issues)
    • ✅ codenameone-maven-plugin: 0 findings (no issues)
    • ✅ core-unittests: 0 findings (no issues)
    • ✅ ios: 0 findings (no issues)
    • ✅ javac: 0 findings (no issues)
    • ✅ project-model: 0 findings (no issues)
  • ✅ PMD: 0 findings (no issues) [Report archive]
  • ✅ Checkstyle: 0 findings (no issues) [Report archive]

Generated automatically by the PR CI workflow.

@shai-almog

shai-almog commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 185 screenshots: 185 matched.
Native Windows port (arm64 / Apple Silicon - Arm): full hellocodenameone screenshot suite rendered offscreen with Direct2D/DirectWrite, plus the real benchmarks (base64 native/CN1/SIMD, image createMask/applyMask/modifyAlpha/PNG/JPEG, NEON SIMD kernels). Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 49ms / native 2ms = 24.5x speedup
SIMD float-mul (64K x300) java 49ms / native 2ms = 24.5x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 61.000 ms
Base64 CN1 decode 71.000 ms
Base64 SIMD encode 77.000 ms
Base64 encode ratio (SIMD/CN1) 1.262x (26.2% slower)
Base64 SIMD decode 73.000 ms
Base64 decode ratio (SIMD/CN1) 1.028x (2.8% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 5.000 ms
Image createMask (SIMD on) 1.000 ms
Image createMask ratio (SIMD on/off) 0.200x (80.0% faster)
Image applyMask (SIMD off) 18.000 ms
Image applyMask (SIMD on) 19.000 ms
Image applyMask ratio (SIMD on/off) 1.056x (5.6% slower)
Image modifyAlpha (SIMD off) 18.000 ms
Image modifyAlpha (SIMD on) 14.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.778x (22.2% faster)
Image modifyAlpha removeColor (SIMD off) 21.000 ms
Image modifyAlpha removeColor (SIMD on) 14.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.667x (33.3% faster)

ParparVM vs HotSpot (JDK 25): Windows arm64

Runner CPU: ARMv8 (64-bit) Family 8 Model D49 Revision 0, MICROSOFT CORPORATION (baseline windows-arm64@armv8-64-bit-family-8-model-d49-microsoft-corporation)

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 vm/selfhost/perf-baseline/ fails: above it is a regression, below it an improvement that has to be rebaselined (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (WinHelloMain) 4 1.01x (base 1.11x, -8.9%) 0.58x (base 0.75x, -22.2%) ok
translator (self) 4 0.88x (base 0.84x, +5.2%) 0.49x (base 0.51x, -3.1%) ok
intArithmetic 4 1.04x (base 1.04x, +0.0%) 0.06x (base 0.06x, +3.2%) ok
longArithmetic 4 0.79x (base 0.80x, -0.1%) 0.06x (base 0.06x, +3.6%) ok
mathTranscendental 4 0.70x (base 0.72x, -2.2%) 0.07x (base 0.06x, +2.1%) ok
arraySequential 4 0.36x (base 0.46x, -21.5%) 0.39x (base 0.39x, +0.2%) ok
arrayRandom 4 0.94x (base 0.94x, +0.3%) 0.23x (base 0.23x, +0.4%) ok
objectAllocation 4 1.76x (base 2.81x, -37.5%) 0.30x (base 0.43x, -29.8%) ok
valueEscape 4 0.76x (base 0.76x, +0.0%) 0.05x (base 0.05x, +2.6%) ok
hashMapChurn 4 0.98x (base 0.98x, -0.4%) 0.12x (base 0.12x, -2.1%) ok
stringBuilding 4 1.60x (base 1.43x, +12.2%) 0.27x (base 0.27x, -0.3%) ok
recursion 4 1.45x (base 1.46x, -0.9%) 0.07x (base 0.07x, +1.4%) ok
quicksort 4 1.01x (base 1.00x, +0.9%) 0.12x (base 0.12x, +0.8%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 185 screenshots: 185 matched.
Native Linux port (x64), GTK3/Cairo/Pango, ParparVM bytecode-to-C (no JVM): the hellocodenameone screenshot suite rendered by a native ELF built + run on the GitHub x64 runner. Baseline: scripts/linux/screenshots.

ParparVM vs HotSpot (JDK 25): Linux x64

Runner CPU: AMD EPYC 7763 64-Core Processor (baseline linux-x64@amd-epyc-7763-64-core-processor)

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 vm/selfhost/perf-baseline/ fails: above it is a regression, below it an improvement that has to be rebaselined (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (LinuxHelloMain) 4 0.81x (base 0.85x, -4.2%) 0.88x (base 0.79x, +11.7%) ok
translator (self) 4 0.54x (base 0.50x, +8.5%) 0.47x (base 0.52x, -9.1%) ok
intArithmetic 4 1.10x (base 1.12x, -1.2%) 0.04x (base 0.06x, -30.2%) ok
longArithmetic 4 1.08x (base 1.08x, +0.0%) 0.04x (base 0.05x, -29.5%) ok
mathTranscendental 4 1.08x (base 1.08x, -0.0%) 0.04x (base 0.07x, -45.0%) ok
arraySequential 4 2.03x (base 2.00x, +1.1%) 0.36x (base 0.36x, +0.8%) ok
arrayRandom 4 1.00x (base 0.91x, +10.2%) 0.20x (base 0.21x, -3.0%) ok
objectAllocation 4 1.50x (base 1.65x, -8.9%) 0.29x (base 0.26x, +12.6%) ok
valueEscape 4 0.10x (base 0.10x, -0.3%) 0.03x (base 0.04x, -37.1%) ok
hashMapChurn 4 1.50x (base 1.48x, +0.9%) 0.10x (base 0.09x, +8.8%) ok
stringBuilding 4 1.30x (base 1.39x, -6.6%) 0.31x (base 0.31x, -0.0%) ok
recursion 4 1.19x (base 1.25x, -5.2%) 0.04x (base 0.08x, -48.5%) ok
quicksort 4 1.11x (base 1.07x, +3.5%) 0.10x (base 0.11x, -12.9%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 185 screenshots: 185 matched.
Native Linux port (arm64), GTK3/Cairo/Pango, ParparVM bytecode-to-C (no JVM): the hellocodenameone screenshot suite rendered by a native ELF built + run on the GitHub arm64 runner. Baseline: scripts/linux/screenshots-arm.

ParparVM vs HotSpot (JDK 25): Linux arm64

Runner CPU: Neoverse-N2 (baseline linux-arm64@neoverse-n2)

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 vm/selfhost/perf-baseline/ fails: above it is a regression, below it an improvement that has to be rebaselined (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (LinuxHelloMain) 4 0.93x (base 1.02x, -8.7%) 0.82x (base 0.93x, -12.4%) ok
translator (self) 4 0.76x (base 0.70x, +9.3%) 0.45x (base 0.43x, +3.7%) ok
intArithmetic 4 1.04x (base 1.04x, -0.0%) 0.03x (base 0.03x, +4.8%) ok
longArithmetic 4 0.79x (base 0.79x, -0.1%) 0.03x (base 0.03x, +5.3%) ok
mathTranscendental 4 1.10x (base 1.10x, -0.0%) 0.04x (base 0.03x, +9.6%) ok
arraySequential 4 0.38x (base 0.36x, +3.7%) 0.37x (base 0.37x, +0.4%) ok
arrayRandom 4 0.94x (base 0.94x, -0.2%) 0.20x (base 0.20x, +0.9%) ok
objectAllocation 4 1.96x (base 1.77x, +10.6%) 0.37x (base 0.38x, -2.1%) ok
valueEscape 4 0.51x (base 0.51x, -0.1%) 0.03x (base 0.03x, +6.2%) ok
hashMapChurn 4 0.84x (base 0.84x, -0.1%) 0.12x (base 0.12x, +1.0%) ok
stringBuilding 4 1.37x (base 1.57x, -12.3%) 0.26x (base 0.26x, -0.1%) ok
recursion 4 1.45x (base 1.43x, +0.8%) 0.04x (base 0.04x, +3.2%) ok
quicksort 4 0.99x (base 0.99x, +0.2%) 0.09x (base 0.09x, +1.4%) ok

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>
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@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

while (position < length && Character.isDigit(value.charAt(position))) {

P2 Badge Restrict duration syntax to ASCII digits

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

Comment thread vm/JavaAPI/src/java/util/concurrent/CompletableFuture.java Outdated
Comment thread vm/JavaAPI/src/java/util/concurrent/CompletableFuture.java
Comment thread vm/JavaAPI/src/java/lang/Character.java Outdated
Comment thread vm/JavaAPI/src/java/lang/StringBuffer.java Outdated
Comment thread vm/JavaAPI/src/java/time/format/DateTimeFormatter.java Outdated
Comment thread vm/JavaAPI/src/java/lang/Character.java Outdated
Comment thread vm/JavaAPI/src/java/lang/StringBuffer.java Outdated
Comment thread vm/JavaAPI/src/java/time/format/DateTimeFormatter.java Outdated
Comment thread vm/JavaAPI/src/java/lang/Math.java Outdated
Comment thread vm/JavaAPI/src/java/util/concurrent/ScheduledPool.java
@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ ByteCodeTranslator Quality Report

Test & Coverage

  • ✅ Tests: 834 total, 0 failed, 55 skipped

Benchmark Results

  • Execution Time: 7613 ms

  • Hotspots (Top 20 sampled methods):

    • 12.67% com.codename1.tools.translator.IteratorEscape.mangle (148 samples)
    • 8.13% java.lang.System.identityHashCode (95 samples)
    • 7.79% java.util.ArrayList.indexOf (91 samples)
    • 5.05% com.codename1.tools.translator.BytecodeMethod.equals (59 samples)
    • 3.60% java.lang.Object.hashCode (42 samples)
    • 3.17% com.codename1.tools.translator.classfile.analysis.Frame.execute (37 samples)
    • 2.14% com.codename1.tools.translator.BytecodeMethod.updateInlinableFieldDependencies (25 samples)
    • 1.80% java.lang.StringBuilder.append (21 samples)
    • 1.71% java.lang.String.equals (20 samples)
    • 1.71% java.util.HashMap.hash (20 samples)
    • 1.54% com.codename1.tools.translator.Parser.cullMethods (18 samples)
    • 1.46% com.codename1.tools.translator.IteratorEscape.ctorOnlyStoresParamsIntoThis (17 samples)
    • 1.28% java.io.FileOutputStream.writeBytes (15 samples)
    • 1.20% com.codename1.tools.translator.bytecodes.Invoke.resolveDirectTarget (14 samples)
    • 1.11% com.codename1.tools.translator.bytecodes.Invoke.findMethodUp (13 samples)
    • 1.11% java.lang.StringCoding.encode (13 samples)
    • 0.94% java.util.HashMap.putVal (11 samples)
    • 0.94% com.codename1.tools.translator.ReachabilityCull.run (11 samples)
    • 0.94% com.codename1.tools.translator.JavascriptReachability.enqueueResolved (11 samples)
    • 0.94% com.codename1.tools.translator.ByteCodeClass.markDependencies (11 samples)
  • ⚠️ Coverage report not generated.

Static Analysis

  • ✅ SpotBugs: no findings (report was not generated by the build).
  • ⚠️ PMD report not generated.
  • ⚠️ Checkstyle report not generated.

Generated automatically by the PR CI workflow.

@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@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

default V getOrDefault(Object key, V defaultValue) {
V v = get(key);
return v != null ? v : defaultValue;

P2 Badge Distinguish null mappings in getOrDefault

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

Comment thread vm/JavaAPI/src/java/time/format/DateTimeFormatter.java Outdated
Comment thread vm/JavaAPI/src/java/util/IntSummaryStatistics.java
Comment thread vm/JavaAPI/src/java/util/concurrent/CompletableFuture.java
Comment thread vm/JavaAPI/src/java/util/ReversedList.java
…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>
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 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".

Comment thread vm/JavaAPI/src/java/text/ChoiceFormat.java
Comment thread vm/JavaAPI/src/java/util/concurrent/CompletableFuture.java
Comment thread vm/JavaAPI/src/java/time/format/DateTimeFormatter.java
Comment thread vm/JavaAPI/src/java/time/format/DateTimeFormatter.java Outdated
Comment thread vm/JavaAPI/src/java/time/format/DateTimeFormatter.java
…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>
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 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".

Comment thread CodenameOne/src/com/codename1/util/regex/Pattern.java Outdated
Comment thread vm/JavaAPI/src/java/time/format/DateTimeFormatter.java
Comment thread vm/JavaAPI/src/java/util/Spliterators.java
Comment thread vm/JavaAPI/src/java/lang/Character.java Outdated
Comment thread vm/JavaAPI/src/java/util/concurrent/CopyOnWriteArrayList.java
…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>
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 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".

Comment thread vm/JavaAPI/src/java/util/Locale.java
Comment thread vm/JavaAPI/src/java/util/concurrent/ConcurrentHashMap.java
Comment thread vm/JavaAPI/src/java/lang/Runtime.java
Comment thread vm/JavaAPI/src/java/lang/Thread.java
shai-almog and others added 2 commits October 20, 2026 17:08
# 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>
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 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".

Comment thread vm/JavaAPI/src/java/lang/Thread.java
Comment thread vm/JavaAPI/src/java/text/SimpleDateFormat.java
Comment thread vm/JavaAPI/src/java/util/concurrent/Executors.java
Comment thread vm/JavaAPI/src/java/time/temporal/TemporalUnit.java Outdated
shai-almog and others added 2 commits October 20, 2026 20:21
…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>
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 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".

Comment thread vm/JavaAPI/src/java/util/stream/Stream.java
Comment thread vm/JavaAPI/src/java/util/Arrays.java
Comment thread vm/JavaAPI/src/java/lang/Throwable.java
Comment thread vm/JavaAPI/src/java/lang/StringBuffer.java
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 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".

Comment thread vm/JavaAPI/src/java/util/concurrent/CopyOnWriteArrayList.java
Comment thread vm/JavaAPI/src/java/util/concurrent/CopyOnWriteArrayList.java
Comment thread vm/JavaAPI/src/java/util/ImmutableCollections.java
Comment thread vm/JavaAPI/src/java/util/ImmutableCollections.java
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 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".

Comment thread vm/JavaAPI/src/java/time/format/DateTimeFormatter.java
Comment thread vm/JavaAPI/src/java/text/MessageFormat.java
Comment thread vm/JavaAPI/src/java/util/concurrent/CompletableFuture.java Outdated
… use defaultExecutor

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 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();

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 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 👍 / 👎.

Comment on lines +184 to +185
public void setInfinity(String infinity) {
this.infinity = infinity;

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 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);

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 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;

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 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 👍 / 👎.

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.

1 participant