Skip to content

Swing, SwingX and JavaFX compatibility layers: desktop Java apps as Codename One apps - #5980

Open
shai-almog wants to merge 12 commits into
masterfrom
desktop-compat-layer
Open

shai-almog wants to merge 12 commits into
masterfrom
desktop-compat-layer

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

What this adds

An existing Swing or JavaFX project builds as a Codename One application for every target, the way an Android module does with the Android compatibility layer. The sources are imported with cn1:import-desktop-project into common/src/main/desktop and built unmodified.

  • maven/swing-compat: java.awt, Java2D, javax.swing, java.beans, javax.imageio, a SwingX subset and the FlatLaf entry points, written over Codename One components. Authored already relocated, because the JDK owns those package names; applications compile against the JDK's Swing.
  • maven/javafx-compat: the javafx.* subset (scene graph, controls, charts, layout panes, properties and bindings, animation, effects, Canvas), authored under the real names.
  • maven/fxml-compiler: FXML and JavaFX CSS compiled at build time; nothing on a device parses XML or reflects.
  • maven/compat-jdk: the JDK classes a device lacks (streams, java.util.function, java.nio.file, regex, CompletableFuture, java.time gaps and more), shared with the Android layer.
  • maven/build-engine: one composed relocation pass over every layer, generated entry points and registries, records and pattern switches desugared, and the compliance check extended so that unsupported API is a build error reported under its original name and source line.
  • Maven and Gradle plugin wiring, the archetype profile, samples (scripts/desktop-compat-samples), screenshot tests in hellocodenameone, an integration test, a real-port interaction harness (maven/integration-tests/desktop-compat-realport) and a benchmark harness (scripts/desktop-compat-benchmarks).
  • Developer guide chapter docs/developer-guide/Desktop-Interop.asciidoc, with measured size, memory and start-up tables.

Verified locally

  • Unit tests green: compat-jdk 276, swing-compat 731, javafx-compat 496, fxml-compiler 45, build-engine 2561 (3 skipped), Maven plugin 439, Gradle plugin 24.
  • SpotBugs: zero findings in the seven modules that produce a report.
  • Control characters, author and since tags, copyright headers, package-info, cast semantics, build-hint catalog, workflow validation and the markdown doc validator pass.

Not verified / known gaps

  • The new workflows (desktop-compat.yml additions, desktop-compat-benchmarks.yml) have never run on GitHub. Windows is unmeasured; macOS runtime numbers need run-macos-bench.sh.
  • Screenshot goldens for the new DesktopCompat* tests have to be seeded from the first CI run.
  • Native Linux port issues found while measuring, not fixed here yet: window size is fixed at 800x600; clips under a transform cull children of a scaled node (one JavaFX game draws only its grid); images are never freed (an image-per-frame canvas application grows without bound); typed text is not visible in text fields.
  • JavaSE port: Ctrl/Alt/Meta key combinations do not reach the application, so accelerators and mnemonics are inert.
  • The cloud builder needs a companion change before cloud builds pick the layers up.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 10, 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

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 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-17T04:44:07.341095Z b9f0a19 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 10, 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)
    • ✅ desktop-compat-runtime: 0 findings (no issues)
    • ✅ fxml-compiler: 0 findings (no issues)
    • ✅ ios: 0 findings (no issues)
    • ✅ javac: 0 findings (no issues)
    • ✅ javafx-compat: 0 findings (no issues)
    • ✅ project-model: 0 findings (no issues)
    • ✅ swing-compat: 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.

@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@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

public boolean setReadOnly() {
return exists();

P2 Badge Report failure when read-only mode cannot be applied

On the device filesystem this method changes no permissions, yet for every existing file it reports that making the file read-only succeeded while canWrite() continues to return true. Code that checks the return value may therefore assume sensitive or finalized data is protected when it remains writable; return false when the requested state cannot be established.

ℹ️ 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 maven/build-engine/src/main/java/com/codename1/maven/DesktopProjectImporter.java Outdated
Comment thread maven/build-engine/src/main/java/com/codename1/maven/DesktopProjectImporter.java Outdated
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/ObjPipeline.java Outdated
Comment thread Ports/CLDC11/src/java/util/concurrent/CompletableFuture.java Outdated
Comment thread maven/build-engine/src/main/java/com/codename1/maven/DependencyClassifier.java Outdated
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/JdkSystem.java Outdated
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/ScheduledPool.java Outdated
Comment thread Ports/CLDC11/src/java/util/concurrent/CompletableFuture.java
Comment thread Ports/CLDC11/src/java/nio/file/PathImpl.java
@shai-almog

shai-almog commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 206 screenshots: 206 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 30ms / native 2ms = 15.0x speedup
SIMD float-mul (64K x300) java 30ms / native 2ms = 15.0x 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 37.000 ms
Base64 CN1 decode 45.000 ms
Base64 SIMD encode 51.000 ms
Base64 encode ratio (SIMD/CN1) 1.378x (37.8% slower)
Base64 SIMD decode 52.000 ms
Base64 decode ratio (SIMD/CN1) 1.156x (15.6% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 7.000 ms
Image createMask (SIMD on) 2.000 ms
Image createMask ratio (SIMD on/off) 0.286x (71.4% faster)
Image applyMask (SIMD off) 22.000 ms
Image applyMask (SIMD on) 17.000 ms
Image applyMask ratio (SIMD on/off) 0.773x (22.7% faster)
Image modifyAlpha (SIMD off) 21.000 ms
Image modifyAlpha (SIMD on) 9.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.429x (57.1% faster)
Image modifyAlpha removeColor (SIMD off) 16.000 ms
Image modifyAlpha removeColor (SIMD on) 12.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.750x (25.0% faster)

ParparVM vs HotSpot (JDK 25): Windows x64

Runner CPU: AMD64 Family 26 Model 2 Stepping 1, AuthenticAMD (baseline windows-x64@amd64-family-26-model-2-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 20% (time) / 25% (RAM) above its baseline in vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (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.52x (base 1.41x, +7.6%) 0.56x (base 0.68x, -17.7%) ok
translator (self) 4 0.83x (base 0.90x, -7.4%) 0.45x (base 0.47x, -3.3%) ok
intArithmetic 4 1.00x (base 0.99x, +0.9%) 0.06x (base 0.05x, +2.9%) ok
longArithmetic 4 1.00x (base 0.99x, +0.7%) 0.06x (base 0.05x, +3.0%) ok
mathTranscendental 4 0.93x (base 0.94x, -0.8%) 0.06x (base 0.06x, +2.4%) ok
arraySequential 4 1.63x (base 1.75x, -6.7%) 0.38x (base 0.38x, +0.4%) ok
arrayRandom 4 0.98x (base 1.00x, -2.3%) 0.23x (base 0.23x, +0.7%) ok
objectAllocation 4 1.56x (base 1.65x, -5.3%) 0.17x (base 0.21x, -16.3%) ok
valueEscape 4 0.10x (base 0.10x, +0.6%) 0.05x (base 0.04x, +2.8%) ok
hashMapChurn 4 1.76x (base 1.59x, +10.4%) 0.08x (base 0.09x, -9.7%) ok
stringBuilding 4 1.40x (base 1.39x, +1.3%) 0.27x (base 0.27x, +1.0%) ok
recursion 4 1.42x (base 1.44x, -1.6%) 0.06x (base 0.06x, +3.1%) ok
quicksort 4 1.08x (base 1.06x, +2.7%) 0.12x (base 0.12x, +1.7%) ok

Result: no regression

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

✅ ByteCodeTranslator Quality Report

Test & Coverage

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

Benchmark Results

  • Execution Time: 7430 ms

  • Hotspots (Top 20 sampled methods):

    • 10.58% com.codename1.tools.translator.IteratorEscape.ctorOnlyStoresParamsIntoThis (114 samples)
    • 7.43% java.lang.Object.hashCode (80 samples)
    • 6.50% java.lang.System.identityHashCode (70 samples)
    • 6.04% java.util.ArrayList.indexOf (65 samples)
    • 5.11% com.codename1.tools.translator.BytecodeMethod.equals (55 samples)
    • 3.81% com.codename1.tools.translator.IteratorEscape.mangle (41 samples)
    • 2.79% java.lang.StringBuilder.append (30 samples)
    • 2.41% com.codename1.tools.translator.classfile.analysis.Frame.execute (26 samples)
    • 1.95% com.codename1.tools.translator.BytecodeMethod.updateInlinableFieldDependencies (21 samples)
    • 1.67% com.codename1.tools.translator.IteratorEscape.walk (18 samples)
    • 1.67% com.codename1.tools.translator.bytecodes.Invoke.resolveDirectTarget (18 samples)
    • 1.58% java.lang.String.equals (17 samples)
    • 1.39% com.codename1.tools.translator.JavascriptReachability.enqueueResolved (15 samples)
    • 1.30% com.codename1.tools.translator.ByteCodeClass.generateCCode (14 samples)
    • 1.30% com.codename1.tools.translator.bytecodes.Invoke.findMethodUp (14 samples)
    • 1.21% java.io.FileOutputStream.writeBytes (13 samples)
    • 1.11% com.codename1.tools.translator.classfile.tree.JsrInliner.replay (12 samples)
    • 1.11% com.codename1.tools.translator.Parser.collectTypeTests (12 samples)
    • 1.02% com.codename1.tools.translator.BytecodeMethod.addToConstantPool (11 samples)
    • 0.93% com.codename1.tools.translator.DeadFieldElimination.run (10 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

shai-almog commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 206 screenshots: 206 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 60.000 ms
Base64 CN1 decode 70.000 ms
Base64 SIMD encode 78.000 ms
Base64 encode ratio (SIMD/CN1) 1.300x (30.0% slower)
Base64 SIMD decode 69.000 ms
Base64 decode ratio (SIMD/CN1) 0.986x (1.4% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 6.000 ms
Image createMask (SIMD on) 2.000 ms
Image createMask ratio (SIMD on/off) 0.333x (66.7% faster)
Image applyMask (SIMD off) 20.000 ms
Image applyMask (SIMD on) 21.000 ms
Image applyMask ratio (SIMD on/off) 1.050x (5.0% 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) 23.000 ms
Image modifyAlpha removeColor (SIMD on) 15.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.652x (34.8% 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 20% (time) / 25% (RAM) above its baseline in vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (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.00x (base 1.11x, -9.7%) 0.81x (base 0.75x, +8.3%) ok
translator (self) 4 0.85x (base 0.84x, +2.0%) 0.47x (base 0.51x, -6.4%) ok
intArithmetic 4 1.04x (base 1.04x, +0.0%) 0.06x (base 0.06x, +3.1%) ok
longArithmetic 4 0.79x (base 0.80x, -0.1%) 0.06x (base 0.06x, +3.4%) ok
mathTranscendental 4 0.72x (base 0.72x, -0.3%) 0.07x (base 0.06x, +1.8%) ok
arraySequential 4 0.36x (base 0.46x, -19.9%) 0.39x (base 0.39x, +0.0%) ok
arrayRandom 4 0.94x (base 0.94x, +0.3%) 0.23x (base 0.23x, +0.2%) ok
objectAllocation 4 1.77x (base 1.82x, -2.5%) 0.41x (base 0.43x, -4.4%) ok
valueEscape 4 0.76x (base 0.76x, +0.1%) 0.05x (base 0.05x, +3.2%) ok
hashMapChurn 4 1.00x (base 0.98x, +1.7%) 0.12x (base 0.12x, -2.4%) ok
stringBuilding 4 1.61x (base 1.43x, +12.5%) 0.27x (base 0.27x, -0.3%) ok
recursion 4 1.55x (base 1.46x, +5.7%) 0.07x (base 0.07x, +1.2%) ok
quicksort 4 1.00x (base 1.00x, +0.3%) 0.12x (base 0.12x, +0.7%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 184 screenshots: 184 matched.
✅ Native Apple TV (tvOS, Metal) screenshot tests passed.

@shai-almog

shai-almog commented Oct 10, 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 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 191 screenshots: 191 matched.

Native Android coverage

  • 📊 Line coverage: 19.18% (48146/250969 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 17.88% (228776/1279321), branch 12.19% (16780/137650), complexity 9.81% (12876/131192), method 14.81% (9093/61394), class 25.78% (1769/6863)
    • 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: 19.18% (48146/250969 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 17.88% (228776/1279321), branch 12.19% (16780/137650), complexity 9.81% (12876/131192), method 14.81% (9093/61394), class 25.78% (1769/6863)
    • 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 157ms / native 189ms = 0.8x speedup
SIMD float-mul (64K x300) java 129ms / native 52ms = 2.4x 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 62.000 ms
Base64 CN1 decode 68.000 ms
Base64 native encode 380.000 ms
Base64 encode ratio (CN1/native) 0.163x (83.7% faster)
Base64 native decode 237.000 ms
Base64 decode ratio (CN1/native) 0.287x (71.3% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog

shai-almog commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 206 screenshots: 206 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 9V74 80-Core Processor (baseline linux-x64@amd-epyc-9v74-80-core-processor)

1 improvement past the baseline (not a failure; rebaseline to lock it in):

  • hello (LinuxHelloMain) on all 4 CPUs: RAM 0.68x against a 0.96x baseline (-28.9%, tolerance 25%)

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 20% (time) / 25% (RAM) above its baseline in vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (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 0.90x, +3.6%) 0.68x (base 0.96x, -28.9%) improved: rebaseline to lock in (RAM -28.9%)
translator (self) 4 0.58x (base 0.63x, -7.7%) 0.47x (base 0.46x, +0.8%) ok
intArithmetic 4 1.10x (base 1.10x, -0.0%) 0.06x (base 0.06x, +2.5%) ok
longArithmetic 4 1.08x (base 1.08x, +0.0%) 0.07x (base 0.06x, +35.2%) ok
mathTranscendental 4 1.09x (base 1.09x, -0.5%) 0.06x (base 0.07x, -13.0%) ok
arraySequential 4 2.87x (base 2.81x, +2.3%) 0.38x (base 0.35x, +6.1%) ok
arrayRandom 4 1.07x (base 1.02x, +4.4%) 0.21x (base 0.21x, -1.2%) ok
objectAllocation 4 1.22x (base 1.21x, +0.8%) 0.33x (base 0.39x, -15.2%) ok
valueEscape 4 0.10x (base 0.10x, -0.0%) 0.04x (base 0.06x, -22.8%) ok
hashMapChurn 4 1.06x (base 1.10x, -3.1%) 0.11x (base 0.10x, +13.6%) ok
stringBuilding 4 1.50x (base 1.49x, +1.1%) 0.26x (base 0.26x, +0.6%) ok
recursion 4 1.14x (base 1.24x, -8.3%) 0.06x (base 0.06x, +1.1%) ok
quicksort 4 1.10x (base 1.07x, +3.1%) 0.13x (base 0.11x, +18.2%) ok

A change that moves performance ON PURPOSE records the new baseline in vm/selfhost/perf-baseline/pr/5980.json, with the reason, from this job's perf-results.json. The rebaseline is then part of this pull request's diff:

python3 vm/selfhost/calibrate-perf-baseline.py --pr 5980 --reason "<why these benchmarks moved>" perf-results.json

Result: no regression (improved past the baseline: consider rebaselining)

@shai-almog

shai-almog commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 206 screenshots: 206 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 20% (time) / 25% (RAM) above its baseline in vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (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.98x (base 1.02x, -3.9%) 0.64x (base 0.93x, -31.1%) ok
translator (self) 4 0.74x (base 0.70x, +5.8%) 0.45x (base 0.43x, +3.9%) 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.0%) 0.03x (base 0.03x, +4.9%) ok
mathTranscendental 4 1.10x (base 1.10x, +0.3%) 0.04x (base 0.03x, +8.7%) ok
arraySequential 4 0.38x (base 0.36x, +4.2%) 0.37x (base 0.37x, +0.4%) ok
arrayRandom 4 0.93x (base 0.94x, -0.6%) 0.20x (base 0.20x, +0.9%) ok
objectAllocation 4 1.98x (base 1.77x, +12.2%) 0.37x (base 0.37x, +0.5%) ok
valueEscape 4 0.51x (base 0.51x, -0.1%) 0.03x (base 0.03x, +5.1%) ok
hashMapChurn 4 0.85x (base 0.84x, +1.0%) 0.11x (base 0.12x, -5.3%) ok
stringBuilding 4 1.36x (base 1.57x, -13.4%) 0.26x (base 0.26x, +0.3%) ok
recursion 4 1.47x (base 1.43x, +2.4%) 0.04x (base 0.04x, +3.2%) ok
quicksort 4 1.00x (base 0.99x, +1.0%) 0.09x (base 0.09x, +1.4%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

@shai-almog

shai-almog commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 206 screenshots: 206 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 64ms / native 5ms = 12.8x speedup
SIMD float-mul (64K x300) java 66ms / native 5ms = 13.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 91.000 ms
Base64 SIMD encode 112.000 ms
Base64 encode ratio (SIMD/CN1) 1.534x (53.4% slower)
Base64 SIMD decode 104.000 ms
Base64 decode ratio (SIMD/CN1) 1.143x (14.3% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 9.000 ms
Image createMask (SIMD on) 4.000 ms
Image createMask ratio (SIMD on/off) 0.444x (55.6% faster)
Image applyMask (SIMD off) 26.000 ms
Image applyMask (SIMD on) 23.000 ms
Image applyMask ratio (SIMD on/off) 0.885x (11.5% faster)
Image modifyAlpha (SIMD off) 27.000 ms
Image modifyAlpha (SIMD on) 18.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.667x (33.3% faster)
Image modifyAlpha removeColor (SIMD off) 31.000 ms
Image modifyAlpha removeColor (SIMD on) 33.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 1.065x (6.5% slower)

@shai-almog

shai-almog commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 249 screenshots: 249 matched.
✅ Native Apple Watch (watchOS, Core Graphics) screenshot tests passed.

@shai-almog

shai-almog commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 188 screenshots: 188 matched.
✅ Native Mac screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 682 seconds

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 69ms / native 7ms = 9.8x speedup
SIMD float-mul (64K x300) java 68ms / native 3ms = 22.6x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 87.000 ms
Base64 CN1 decode 71.000 ms
Base64 native encode 817.000 ms
Base64 encode ratio (CN1/native) 0.106x (89.4% faster)
Base64 native decode 344.000 ms
Base64 decode ratio (CN1/native) 0.206x (79.4% faster)
Base64 SIMD encode 69.000 ms
Base64 encode ratio (SIMD/CN1) 0.793x (20.7% faster)
Base64 SIMD decode 78.000 ms
Base64 decode ratio (SIMD/CN1) 1.099x (9.9% slower)
Base64 encode ratio (SIMD/native) 0.084x (91.6% faster)
Base64 decode ratio (SIMD/native) 0.227x (77.3% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 13.000 ms
Image createMask (SIMD on) 10.000 ms
Image createMask ratio (SIMD on/off) 0.769x (23.1% faster)
Image applyMask (SIMD off) 90.000 ms
Image applyMask (SIMD on) 67.000 ms
Image applyMask ratio (SIMD on/off) 0.744x (25.6% faster)
Image modifyAlpha (SIMD off) 86.000 ms
Image modifyAlpha (SIMD on) 71.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.826x (17.4% faster)
Image modifyAlpha removeColor (SIMD off) 97.000 ms
Image modifyAlpha removeColor (SIMD on) 116.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 1.196x (19.6% slower)

@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

public boolean createNewFile() throws IOException {
if (exists()) {
return false;
}
File parent = getParentFile();
if (parent != null && !parent.exists()) {
throw new IOException("No such file or directory: " + getParent());
}
OutputStream out = fs().openOutputStream(storagePath());

P2 Badge Make createNewFile's existence check atomic

When two threads use createNewFile() for the same path, both can observe that it does not exist and both then open it for output, so both return true and the later open may truncate data written by the first caller. Desktop code commonly relies on this method's atomic create semantics for lock and sentinel files; serialize the check-and-create operation at least within the application process, or use an exclusive-create primitive where the port provides one.


if (append && fs.exists(p)) {
out = fs.openOutputStream(p, (int) fs.getLength(p));

P2 Badge Refuse append offsets that overflow the storage API

When appending to a file larger than Integer.MAX_VALUE, narrowing its length to int wraps the offset before it is passed to FileSystemStorage. Depending on the port this either fails or writes at an earlier position and corrupts the existing file instead of appending; since the underlying API cannot express larger offsets, detect this case and fail explicitly rather than truncating the position.

ℹ️ 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 maven/build-engine/src/main/java/com/codename1/maven/DesktopProjectImporter.java Outdated
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/Executors.java Outdated
Comment thread Ports/CLDC11/src/java/util/concurrent/ScheduledPool.java
Comment thread maven/build-engine/src/main/java/com/codename1/maven/CompatLibraries.java Outdated
Comment thread Ports/CLDC11/src/java/nio/file/PathImpl.java
Comment thread maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/PomWiring.java Outdated
@shai-almog

shai-almog commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 192 screenshots: 192 matched.
✅ Native Mac screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 451 seconds

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 60ms / native 3ms = 20.0x speedup
SIMD float-mul (64K x300) java 52ms / native 3ms = 17.3x 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 active (NEON-accelerated)
Base64 CN1 encode 55.000 ms
Base64 CN1 decode 83.000 ms
Image encode benchmark iterations 100
Image createMask (SIMD off) 19.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.158x (84.2% faster)
Image applyMask (SIMD off) 75.000 ms
Image applyMask (SIMD on) 73.000 ms
Image applyMask ratio (SIMD on/off) 0.973x (2.7% faster)
Image modifyAlpha (SIMD off) 71.000 ms
Image modifyAlpha (SIMD on) 51.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.718x (28.2% faster)
Image modifyAlpha removeColor (SIMD off) 61.000 ms
Image modifyAlpha removeColor (SIMD on) 65.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 1.066x (6.6% slower)

ParparVM vs HotSpot (JDK 25): macOS arm64

Runner CPU: Apple M1 (Virtual) (baseline macos-arm64)

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 20% (time) / 25% (RAM) above its baseline in vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (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 (HelloCodenameOne) 3 0.84x (base 0.96x, -12.6%) 0.91x (base 0.93x, -2.1%) ok
translator (self) 3 0.65x (base 0.62x, +4.5%) 0.68x (base 0.58x, +17.6%) ok
intArithmetic 3 1.02x (base 1.03x, -1.3%) 0.12x (base 0.12x, +1.0%) ok
longArithmetic 3 1.06x (base 1.03x, +3.2%) 0.12x (base 0.07x, +64.7%) ok
mathTranscendental 3 1.01x (base 1.01x, +0.3%) 0.12x (base 0.12x, +0.7%) ok
arraySequential 3 0.43x (base 0.42x, +3.4%) 0.53x (base 0.53x, +0.3%) ok
arrayRandom 3 0.97x (base 0.99x, -2.0%) 0.32x (base 0.32x, +0.3%) ok
objectAllocation 3 0.98x (base 1.11x, -11.3%) 0.80x (base 0.72x, +10.1%) ok
valueEscape 3 0.51x (base 0.51x, +0.0%) 0.09x (base 0.09x, +2.5%) ok
hashMapChurn 3 1.08x (base 1.18x, -8.1%) 0.08x (base 0.07x, +15.2%) ok
stringBuilding 3 0.91x (base 0.84x, +7.9%) 0.44x (base 0.46x, -4.2%) ok
recursion 3 1.22x (base 1.24x, -0.9%) 0.12x (base 0.12x, +0.9%) ok
quicksort 3 1.02x (base 1.01x, +0.5%) 0.11x (base 0.11x, +0.5%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 189 screenshots: 189 matched.
✅ Native iOS Metal screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 1570 seconds

Build and Run Timing

Metric Duration
Simulator Boot 54000 ms
Simulator Boot (Run) 1000 ms
App Install 13000 ms
App Launch 1000 ms
Test Execution 420000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 57ms / native 4ms = 14.2x speedup
SIMD float-mul (64K x300) java 55ms / native 3ms = 18.3x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 52.000 ms
Base64 CN1 decode 56.000 ms
Base64 native encode 703.000 ms
Base64 encode ratio (CN1/native) 0.074x (92.6% faster)
Base64 native decode 486.000 ms
Base64 decode ratio (CN1/native) 0.115x (88.5% faster)
Base64 SIMD encode 54.000 ms
Base64 encode ratio (SIMD/CN1) 1.038x (3.8% slower)
Base64 SIMD decode 49.000 ms
Base64 decode ratio (SIMD/CN1) 0.875x (12.5% faster)
Base64 encode ratio (SIMD/native) 0.077x (92.3% faster)
Base64 decode ratio (SIMD/native) 0.101x (89.9% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 5.000 ms
Image createMask (SIMD on) 2.000 ms
Image createMask ratio (SIMD on/off) 0.400x (60.0% faster)
Image applyMask (SIMD off) 28.000 ms
Image applyMask (SIMD on) 99.000 ms
Image applyMask ratio (SIMD on/off) 3.536x (253.6% slower)
Image modifyAlpha (SIMD off) 23.000 ms
Image modifyAlpha (SIMD on) 18.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.783x (21.7% faster)
Image modifyAlpha removeColor (SIMD off) 26.000 ms
Image modifyAlpha removeColor (SIMD on) 20.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.769x (23.1% faster)

@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: 534d0f01fc

ℹ️ 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 maven/compat-jdk/src/main/java/com/codename1/compat/jdk/Executors.java Outdated
Comment thread maven/build-engine/src/main/java/com/codename1/maven/DesktopProjectImporter.java Outdated
Comment thread Ports/CLDC11/src/java/nio/file/Files.java Outdated
@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: 9919796706

ℹ️ 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 maven/compat-jdk/src/main/java/com/codename1/compat/jdk/CompletableFuture.java Outdated
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/Matcher.java Outdated
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/JdkTime.java Outdated
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/Base64.java Outdated
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/JdkTime.java Outdated
@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


P2 Badge Honor deleteOnExit during orderly application exit

For every remapped desktop application, File.deleteOnExit() silently does nothing, so temporary files that callers expect to be removed during normal termination remain in the application sandbox across launches. This can steadily consume storage and retain sensitive temporary data even when the app terminates through the orderly JdkSystem.exit path, which already runs shutdown hooks. Record requested paths and delete them during that exit sequence instead of returning without registering any cleanup.

ℹ️ 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 maven/compat-jdk/src/main/java/com/codename1/compat/jdk/ObjPipeline.java Outdated
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/JdkTime.java Outdated
Comment thread Ports/CLDC11/src/java/util/UUID.java
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/JdkDates.java Outdated
@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: 8b053d6629

ℹ️ 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 maven/build-engine/src/main/java/com/codename1/maven/CompatLibraries.java Outdated
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/ScheduledPool.java Outdated
Comment thread maven/build-engine/src/main/java/com/codename1/maven/DesktopProjectImporter.java Outdated
Comment thread maven/build-engine/src/main/java/com/codename1/maven/DesktopProjectImporter.java Outdated
Comment thread Ports/CLDC11/src/java/nio/file/PathImpl.java
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/CompletableFuture.java Outdated
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/JdkSystem.java Outdated

@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: 89cb8679b1

ℹ️ 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 maven/compat-jdk/src/main/java/com/codename1/compat/jdk/Files.java Outdated
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/JdkText.java Outdated
Comment thread maven/build-engine/src/main/java/com/codename1/maven/DesktopProjectImporter.java Outdated
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/JdkStrings.java Outdated
@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: e4ccd77277

ℹ️ 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 maven/compat-jdk/src/main/java/com/codename1/compat/jdk/Preferences.java Outdated
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/JdkStrings.java Outdated
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/JdkNumbers.java Outdated
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/JdkDates.java Outdated
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/Files.java Outdated
@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

public int read(char[] cbuf, int off, int len) throws IOException {
ensureOpen();
if (len == 0) {
return 0;
}
int n = 0;
while (n < len) {
int c = read();

P2 Badge Validate reader ranges before consuming input

This overload does not validate cbuf, off, and len before calling read(). With an invalid range such as read(new char[1], 2, 1), it consumes one character and only then throws when assigning to the array, whereas Reader.read must reject the range without changing the stream; the len == 0 fast path also incorrectly accepts null buffers and invalid offsets. Perform the standard null and bounds checks before reading.

ℹ️ 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 maven/compat-jdk/src/main/java/com/codename1/compat/jdk/JdkDates.java Outdated
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/JdkDates.java Outdated
Comment thread Ports/CLDC11/src/java/util/concurrent/CompletableFuture.java
Comment thread Ports/CLDC11/src/java/text/MessageFormat.java
Comment thread maven/javafx-compat/src/main/java/javafx/scene/Parent.java Outdated
Comment thread maven/javafx-compat/src/main/java/javafx/scene/Scene.java
Comment thread maven/compat-jdk/src/main/java/com/codename1/compat/jdk/ScheduledPool.java Outdated
Comment thread Ports/CLDC11/src/java/util/prefs/Preferences.java Outdated
@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

seconds += amount * 86400L;

P2 Badge Reject overflowing duration text instead of wrapping

When a parsed day, hour, or minute field overflows while being converted to seconds, these unchecked operations wrap to an unrelated duration. For example, Duration.parse("P106751991167301D") returns a large negative duration here, while the JDK reports a DateTimeParseException; use checked multiplication and addition throughout this parsing block and translate arithmetic overflow into a parse failure. The mirrored vm/JavaAPI implementation has the same issue.

ℹ️ 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 Ports/CLDC11/src/java/nio/file/PathImpl.java Outdated
Comment thread Ports/CLDC11/src/java/util/concurrent/CompletableFuture.java Outdated
Comment thread vm/JavaAPI/src/java/lang/String.java Outdated
Comment thread Ports/CLDC11/src/java/util/stream/IntPipeline.java Outdated
Comment thread Ports/CLDC11/src/java/nio/file/Files.java Outdated
@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: cfb5423474

ℹ️ 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 Ports/CLDC11/src/java/nio/file/Files.java Outdated
Comment thread Ports/CLDC11/src/java/time/LocalTime.java Outdated
Comment thread Ports/CLDC11/src/java/time/ZoneId.java Outdated
Comment thread Ports/CLDC11/src/java/util/WeakHashMap.java
Comment thread vm/JavaAPI/src/java/lang/Character.java Outdated
Comment thread CodenameOne/src/com/codename1/util/regex/Pattern.java
@github-actions

github-actions Bot commented Oct 16, 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.42, 1.79, 1.52

Metric Codename One Flutter Ratio Winner
Installed size 78.2 MB 95.8 MB 1.22x Codename One
Executable code 4.6 MB 20.6 MB 4.42x Codename One
Download size (zipped) 78.2 MB 95.8 MB 1.22x Codename One
Cold start to first frame on screen 364 ms 1451 ms 3.69x Codename One
Memory at rest 46.2 MB 78.6 MB 1.70x 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 7 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 90 ms 186 ms 2.07x
longArithmetic 64 ms 59 ms 0.92x
mathTranscendental 229 ms 350 ms 1.53x
arraySequential 32 ms 36 ms 1.12x
arrayRandom 370 ms 398 ms 1.08x
objectAllocation 67 ms 58 ms 0.87x
valueEscape 7 ms 7 ms 1.00x
hashMapChurn 145 ms 304 ms 2.10x
stringBuilding 97 ms 128 ms 1.32x
recursion 83 ms 273 ms 3.29x
quicksortBench 137 ms 156 ms 1.14x
Geometric mean 1.37x

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.

ios

9 interleaved rounds; host load 34.08, 26.33, 20.58

Metric Codename One Flutter Ratio Winner
Installed size 108.1 MB 110.5 MB 1.02x Codename One
Executable code 17.1 MB 19.1 MB 1.11x Codename One
Download size (zipped) 80.0 MB 81.9 MB 1.02x 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.

Not measured: iOS compute is not measured: a device build needs signed hardware, and on the simulator Flutter runs its JIT debug engine rather than AOT code. The macOS row runs the same ParparVM and Dart AOT compilers on the same Apple silicon.

Gate: within tolerance against scripts/flutter-bench/baseline. Smaller than its baseline, which does not fail the gate: Executable code -7.50% -- 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 5980 --reason "<why these moved>" baseline-ios.json, then commit the overlay it writes.

iOS start-up and memory are not measured here: Flutter cannot AOT-compile for the simulator, so a simulator run would time a JIT debug build against a release build. Sizes come from release device bundles; timings need signed hardware.
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 1.84, 1.06, 0.47

Metric Codename One Flutter Ratio Winner
Installed size 103.9 MB 122.5 MB 1.18x Codename One
Executable code 12.9 MB 25.2 MB 1.96x 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 556 ms wrong result Flutter: wrong result
longArithmetic 4071 ms did not run Flutter: did not run
mathTranscendental 491 ms did not run Flutter: did not run
arraySequential 187 ms 70 ms 0.37x
arrayRandom 733 ms wrong result Flutter: wrong result
objectAllocation 29 ms 21 ms 0.72x
valueEscape 126 ms 6 ms 0.05x
hashMapChurn 858 ms 198 ms 0.23x
stringBuilding 377 ms 88 ms 0.23x
recursion 393 ms 397 ms 1.01x
quicksortBench 374 ms wrong result Flutter: wrong result
Geometric mean 0.30x

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.23, 2.82, 2.41

Metric Codename One Flutter Ratio Winner
Installed size 111.4 MB 143.8 MB 1.29x Codename One
Executable code 14.1 MB 16.1 MB 1.15x Codename One
Download size (zipped) 80.9 MB 92.9 MB 1.15x Codename One
Cold start to first frame on screen 158 ms 228 ms 1.43x Codename One
Memory at rest 84.9 MB 225.4 MB 2.66x 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 56 ms 1.00x
mathTranscendental 254 ms 276 ms 1.09x
arraySequential 16 ms 35 ms 2.19x
arrayRandom 260 ms 302 ms 1.16x
objectAllocation 24 ms 41 ms 1.71x
valueEscape 5 ms 7 ms 1.40x
hashMapChurn 49 ms 323 ms 6.59x
stringBuilding 33 ms 110 ms 3.33x
recursion 95 ms 258 ms 2.72x
quicksortBench 139 ms 150 ms 1.08x
Geometric mean 1.88x

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

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

macos

9 interleaved rounds; host load 7.83, 21.2, 24.16

Metric Codename One Flutter Ratio Winner
Installed size 124.1 MB 139.4 MB 1.12x Codename One
Executable code 33.0 MB 47.9 MB 1.45x Codename One
Download size (zipped) 85.5 MB 93.3 MB 1.09x Codename One
Cold start to first frame on screen 474 ms 725 ms 1.53x Codename One
Memory at rest 36.4 MB 55.4 MB 1.52x 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 8 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 115 ms 254 ms 2.21x
longArithmetic 71 ms 69 ms 0.97x
mathTranscendental 283 ms 326 ms 1.15x
arraySequential 11 ms 44 ms 4.00x
arrayRandom 274 ms 323 ms 1.18x
objectAllocation 51 ms 27 ms 0.53x
valueEscape 5 ms 13 ms 2.60x
hashMapChurn 29 ms 180 ms 6.21x
stringBuilding 23 ms 110 ms 4.78x
recursion 130 ms 267 ms 2.05x
quicksortBench 119 ms 136 ms 1.14x
Geometric mean 1.89x

Gate: within tolerance against scripts/flutter-bench/baseline. Smaller than its baseline, which does not fail the gate: Executable code -6.57% -- 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 5980 --reason "<why these moved>" baseline-macos.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.8 MB 121.1 MB 1.12x Codename One
Executable code 11.3 MB 14.1 MB 1.25x Codename One
Download size (zipped) 77.8 MB 86.4 MB 1.11x Codename One
Cold start to first frame on screen 157 ms 244 ms 1.55x Codename One
Memory at rest 58.4 MB 92.7 MB 1.59x 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 8 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 81 ms 184 ms 2.27x
longArithmetic 60 ms 57 ms 0.95x
mathTranscendental 199 ms 266 ms 1.34x
arraySequential 12 ms 35 ms 2.92x
arrayRandom 253 ms 350 ms 1.38x
objectAllocation 24 ms 39 ms 1.62x
valueEscape 1 ms 7 ms 7.00x
hashMapChurn 51 ms 314 ms 6.16x
stringBuilding 35 ms 122 ms 3.49x
recursion 215 ms 266 ms 1.24x
quicksortBench 143 ms 147 ms 1.03x
Geometric mean 2.11x

Gate: within tolerance against scripts/flutter-bench/baseline. Smaller than its baseline, which does not fail the gate: Executable code -10.80%; Download size (zipped) -0.78% -- 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 5980 --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 26 of 26 measured metrics across 6 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

public int available() throws IOException {
ensureOpen();
return (count - pos) + in.available();

P2 Badge Saturate BufferedInputStream.available on overflow

When the underlying stream reports Integer.MAX_VALUE available bytes while this buffer still contains unread data, the addition wraps and returns a negative number. This can occur with files larger than 2 GiB or custom streams and causes callers to treat available data as absent or use an invalid allocation size; perform the addition as a long and cap the result at Integer.MAX_VALUE.


@Override
public boolean ready() throws IOException {
ensureOpen();
return pos < count || in.ready();

P2 Badge Skip a pending CRLF newline before reporting ready

After readLine() stops at \r, skipLf may be true with only the matching \n left in the buffer. This method then reports true because that discarded character is buffered, even when the underlying reader is not ready; the next read() consumes the \n internally and can block, violating the guarantee made by ready(). Consume the pending LF before deciding whether a returnable character is available.

ℹ️ 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 Ports/CLDC11/src/java/time/Instant.java
Comment thread Ports/CLDC11/src/java/time/LocalDate.java Outdated
Comment thread Ports/CLDC11/src/java/nio/file/attribute/FileTime.java
Comment thread Ports/CLDC11/src/java/util/Properties.java Outdated
Comment thread Ports/CLDC11/src/java/util/concurrent/Executors.java Outdated
Comment thread Ports/CLDC11/src/java/util/concurrent/ScheduledPool.java Outdated
Comment thread Ports/CLDC11/src/java/util/Spliterators.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: b9f0a19b0c

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

}
}
if (started != null) {
started.start();

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 Roll back registrations when Thread.start() fails

When a custom ThreadFactory returns an already-started thread, or Thread.start() otherwise throws, this call runs after both the command and thread have been registered but removes neither. In a single-thread pool, the stale thread then occupies the sole worker slot, so the task never runs and the executor cannot terminate after shutdown(); the new rollback around factory.newThread(...) does not cover this later failure path.

Useful? React with 👍 / 👎.

Comment thread vm/JavaAPI/src/java/lang/Character.java Outdated
Comment on lines +1543 to +1544
|| c >= 0x370 && c <= 0x3ff && c != 0x37e && c != 0x387 && c != 0x375
&& c != 0x384 && c != 0x385 && c != 0x3f6 // Greek

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 Exclude unassigned code points from letter ranges

This broad Greek range includes reserved holes that Unicode classifies as unassigned. For example, U+0378 reaches this branch, so getType returns OTHER_LETTER and isLetter, isJavaIdentifierStart, and isDefined all return true, while the JDK returns false or UNASSIGNED; code validating identifiers or assigned characters can therefore accept reserved characters.

Useful? React with 👍 / 👎.

coords.add(group + ":" + artifact);
("provided".equals(scope) ? provided : shipped).add(group + ":" + artifact);
String version = element(dep.group(1), "version");
version = version == null ? null : resolveIn(version, pom, poms);

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 Resolve inherited versions using child property overrides

When a dependency inherited from a parent uses a property that the child overrides, pom here is the parent's text, so resolveIn resolves the parent's own value before consulting the child POM in poms. Maven instead interpolates the effective inherited dependency with the child's property—for example, a parent dependency using ${lib.version} should use 2 when the child overrides the parent's value 1—so the importer currently adds the wrong dependency version to the application build.

Useful? React with 👍 / 👎.

Runnable release = held.get(i);
try {
release.run();
} catch (RuntimeException e) {

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 Continue releasing flat-map streams after Errors

When a short-circuiting terminal operation closes several nested flatMap streams and the most recently opened stream's close handler throws an Error, this catch does not intercept it, so the loop exits before the earlier mapped streams are closed. This can skip resource-release handlers that the JDK runs while unwinding nested flat maps; catch Throwable and retain the first failure as close() already does.

Useful? React with 👍 / 👎.

Comment on lines +103 to +104
due.set(due.get() + rate);
arm(due.get() - System.currentTimeMillis());

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 Saturate fixed-rate deadline arithmetic

When a fixed-rate period is large enough that adding it to the absolute deadline overflows, the next deadline wraps into the past and is armed with a nonpositive delay. For example, a zero-delay task with a period of Long.MAX_VALUE milliseconds repeatedly fires immediately instead of waiting effectively forever, potentially creating a busy loop; saturate the absolute deadline or track the remaining relative delay without overflowing.

Useful? React with 👍 / 👎.


/// The paths under `start`, `start` first, depth first, to `maxDepth`
/// levels below it.
public static Stream<Path> walk(Path start, int maxDepth, FileVisitOption... options) throws IOException {

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 file-visit options

When callers pass a null options array or a null element, this method ignores it and starts traversing, whereas Files.walk must throw NullPointerException for either input. This silently accepts invalid configuration and may touch the filesystem before the caller discovers anything is wrong; validate the varargs even though FOLLOW_LINKS itself has no effect on this platform. find below has the same omission.

Useful? React with 👍 / 👎.

shai-almog added a commit that referenced this pull request Oct 22, 2026
* Add pure-logic Java class library additions to JavaAPI and CLDC11

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>

* Install the narrow JdkHost from the ParparVM ports

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>

* Translator runtime support and bulk conformance tests for the class library

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

* Rewrite every String regex member onto com.codename1.util.regex

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

* Java API additions: review fixes and CI root causes

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

* Java API additions: second round of review fixes

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

* Java API additions: third round of review fixes and baselines

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

* Java API additions: fourth round of review fixes and baselines

- CompletableFuture: completions drain a per-thread queue, so a long
  chain cannot overflow the stack; a waiter that times out or is
  interrupted is taken off the stack.
- Character: script letters are a table generated from JDK 21's data.
- StringBuffer.compareTo: snapshots the other buffer, no nested locks.
- DateTimeFormatter: each X/x/Z width parses only its own offset form.
- Math.hypot: compensated, within 1 ulp.
- ScheduledPool: re-checks cancellation after claiming the runner.
- Recalibrate the Linux flutter size row and the linux-x64 translator RAM row.

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

* Java API additions: fifth round of review fixes

- Locale.forLanguageTag: only '-' separates subtags.
- MessageFormat: clone keeps, and equals compares, formats the pattern
  cannot spell.
- Collectors.flatMapping: the consuming failure wins, close's is suppressed.
- StreamState.abandon: releases every stage after an Error too.
- CountDownLatch.await: throws for an interrupted caller on an open latch.
- Comments on why the pool's workers survive a failed task and why
  CharSequence streams read eagerly.
- Recalibrate the Linux flutter size row.

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

* Java API additions: sixth round of review fixes

- Regex: ? and {0,1} take their one round of a group that can only match
  empty, so "(^)?" captures the empty string, as the JDK does.
- ZoneId.of: a region ID starts with a letter.
- InputStreamReader/OutputStreamWriter.getEncoding: null once closed.
- BufferedWriter.close: the flush failure wins, close's is suppressed.
- DecimalFormatSymbols: comment on why US NaN stays U+FFFD (JDK 8).

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

* Java API additions: seventh round of review fixes

- Pool.execute: a command that needs a new worker is handed to it, never
  queued, so a thread that fails to start cannot leave it run by another;
  a command queued meanwhile gets a replacement worker.
- BufferedOutputStream.close: the flush failure wins, close's is suppressed.
- ScheduledPool: deadlines saturate, so a huge delay is not already due.
- Collectors: identity-finish collectors report IDENTITY_FINISH, toSet
  also UNORDERED.
- CopyOnWriteArrayList.addAll: snapshot the source before locking.
- PrintWriter: an InterruptedIOException re-interrupts the thread.

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

* Java API review fixes: URI query split, null arguments, ill-formed locale tags

- URI splits the query at the first '?', so later ones stay in the query.
- String charset-name overloads, Clock.fixed and SecureRandom's seed array
  refuse null as the JDK does.
- Locale.toLanguageTag writes und for an ill-formed language and drops an
  ill-formed region.
- Comments on why String.lines stays eager and why a negative grouping
  size is accepted (JDK 8 to 18 behaviour).
- windows-x64 hello RAM perf baseline recalibrated.

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

* Java API review fixes: FutureTask run-once, ranges, overflow, reentrant removeIf

- FutureTask records the outcome before releasing the runner, so a
  concurrent run() cannot call the task twice, and no longer clears an
  interrupt that may not be the cancellation's.
- String.indexOf(int, int, int) searches a supplementary code point as
  its pair and requires it wholly inside the range.
- UUID.fromString refuses a component past Long.MAX_VALUE.
- CopyOnWriteArrayList.removeIf keeps a predicate's own change and throws
  ConcurrentModificationException instead of overwriting it.
- PrintWriter refuses a null Writer.
- Comment on why an unstarted worker still runs its first task after
  shutdownNow (ThreadPoolExecutor does the same).
- Linux flutter size baseline recalibrated.

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

* Java API review fixes: ISO offsets, negative zero year, addAllAbsent lock order

- ISO offset parsing refuses the compact +HHMM and +HHMMss forms.
- An ISO date refuses the year -0000.
- CopyOnWriteArrayList.addAllAbsent snapshots its source before locking,
  as addAll does, so two lists adding each other cannot deadlock.
- Comments on why an empty ChoiceFormat alternative keeps the JDK 8
  answer and why Matcher.results does not fail fast on misuse.

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

* Java API review fixes: zero multiplier parse, null buffers, variants, RandomAccess

- DecimalFormat with a zero multiplier parses zero as NaN and anything
  else as an infinity, instead of returning the number unchanged.
- BufferedReader and BufferedWriter refuse a null delegate.
- Locale.toLanguageTag leaves out a variant that cannot be written as a
  private-use subtag.
- List.reversed() of a RandomAccess list is RandomAccess too.
- Conformance checks, including that sharp s keeps its case.

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

* Java API review fixes: List/Set spliterator characteristics, chunked String writes

- List's default spliterator reports ORDERED and Set's DISTINCT.
- BufferedWriter.write(String, int, int) copies through its own buffer a
  chunk at a time instead of allocating a copy of the whole range.

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

* Java API review fixes: scheduled cancel race, runAndReset, allOf, edge cases

- ScheduledPool: cancel(true) re-checks the runner while marked
  INTERRUPTING and the run waits that out on leaving, so an interrupt can
  no longer reach a worker that has moved on to another task.
- FutureTask.runAndReset records a failure before releasing the runner.
- CompletableFuture.allOf copies the caller's array.
- Instant.until(MILLIS) works from the deltas, so instants near MIN and
  MAX no longer overflow.
- StringBuilder.repeat with a zero count returns before validating.
- windows-arm64 translator RAM perf baseline recorded as measured.

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

* Java API review fixes: adapter characteristics, CharSequence.compare, null streams

- Collectors.mapping, filtering and flatMapping keep the downstream
  collector's characteristics; collectingAndThen drops only
  IDENTITY_FINISH.
- CharSequence.compare uses a Comparable type's own order when both
  arguments are of that type.
- InputStreamReader and OutputStreamWriter refuse a null stream in their
  Charset constructors.
- RAM perf baselines recorded as measured for linux-x64, windows-x64 and
  macos-arm64, which all improved on new runner CPUs.

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

* Java API review fixes: backtracking \R, continued property keys, close on Error

- \R in the regex engine is no longer atomic, so a CR LF pair splits
  when what follows needs the LF (\R\R matches CR LF, as Java 9+ does).
- Properties.load takes an = or : on the line after a key ended by
  blanks and a continuation.
- BufferedOutputStream and BufferedWriter close the delegate when
  flushing throws an Error.
- Comment on why the Matcher replace callbacks do not fail fast.
- Linux flutter size baseline recalibrated.

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

* Java API review fixes: URI relative references, sorted spliterators, leap seconds

- URI: a reference without a scheme is not absolute (resolve() handed every
  relative reference back unresolved), an empty path is "" not null, a
  relative path merges with the base directory, and normalize() keeps the
  path's own leading and trailing slashes.
- Spliterators: an iterator spliterator declared SORTED reports natural order.
- ISO instants: only 23:59:60 is a leap second.
- DecimalFormat: a null affix is stored, as JDK 8 stores it.
- Charset copies its alias array; deadlines are overflow safe for any clock
  origin.
- Comments for the ideographic blocks and BufferedWriter locking.
- windows-arm64 hello RAM baseline.

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

* Java API review fixes: concat null checks, fixed-rate deadlines, removeIf

- Int/Long/DoubleStream.concat check both arguments before consuming one.
- ScheduledPool: the fixed-rate step is overflow safe for any clock origin,
  and shutdownNow() no longer answers a fixed-rate task twice when its
  wrapper is already queued in the pool.
- CopyOnWriteArrayList.removeIf throws ConcurrentModificationException when
  the predicate changed the list, as filter() does.

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

* Java API review fixes: null checks, invokeAll validation, immutable sublists

- PrintWriter refuses a null OutputStream at construction.
- invokeAll wraps every task, refusing a null, before submitting any.
- Period.addTo/subtractFrom refuse a null temporal even for a zero period.
- List.of(...).subList is an immutable copy, so clear() on an empty range
  still throws.
- Comments for PrintWriter locking and recursive computeIfAbsent (JDK 8).

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

* Java API review fixes: close suppression, removeIf check order, subList IAE

- BufferedWriter/BufferedOutputStream.close attach a delegate close failure
  of any kind to the flush failure instead of losing the original.
- CopyOnWriteArrayList.removeIf checks for a reentrant change before its
  nothing-removed return.
- List.of(...).subList throws IllegalArgumentException for reversed bounds.
- Comments for the MessageFormat argument ceiling (JDK 8 has none) and the
  default uncaught-exception handler field.

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

* Java API review fixes: failures skip the executor, X- charsets, unordered set

- CompletableFuture: thenApply/thenAccept/thenRun/thenCompose (async) pass
  an upstream failure on at once instead of submitting a step a shut-down
  executor would reject in its place.
- Charset.isRegistered is false for the reserved X- prefix.
- Collectors.toUnmodifiableSet reports UNORDERED.
- A note at the NaN canonicalization on the raw-bits methods sharing it.

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

* Java API review fixes: variant tags, date literals, stream and regex order

- Locale.toLanguageTag writes the well-formed leading variant subtags as
  they are and only the rest as x-lvariant, as JDK 8 does.
- SimpleDateFormat (and MessageFormat date arguments) check each literal.
- URI.normalize keeps an unmatched ".." without adding a slash.
- Stream.collect checks the stream's state before calling the supplier.
- The rewritten String regex members check the receiver first.
- Comment: a terminated shutdown hook is accepted, as on JDK 8.
- windows-x64 (AMD family 26) baseline from a second sample.

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

* Java API review fixes: allOf/anyOf null checks, runner release, characteristics

- CompletableFuture.allOf/anyOf check every input before installing any
  callback.
- FutureTask releases its runner even when done() throws.
- Int/Long/DoublePipeline.collect check the stream before the supplier.
- groupingBy reports IDENTITY_FINISH when its downstream does.
- String.indexOf(int,int,int) answers -1 for a value that is no code point.
- The literal split shortcut leaves a lone surrogate to the engine.
- Comments: partitioningBy is never IDENTITY_FINISH; the sharp s is below
  the Latin-1 upper-casing range.
- Perf rows for linux-x64 EPYC and windows-x64 Intel from this run.

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

* Java API review fixes: prefixed zone syntax, yield interrupt, CLDC parity

ZoneId.of validates the region syntax of a UTC/GMT/UT-prefixed ID with
no sign; Thread.yield leaves the interrupt status set; COWAL removeAll
and retainAll check for a reentrant change before the nothing-removed
return. The CLDC DateTimeFormatter accepts a leap second only at 23:59,
and the CLDC ScheduledPool.shutdownNow no longer lists an owed fixed-rate
firing twice. Duration.ZERO.addTo(null) stays as JDK 8 has it.
Flutter linux download-size baseline moved by 2 bytes.

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

* Java API review fixes: authority-only resolve, runAndReset release, CHM views

URI.resolve puts a root slash before a relative path merged onto a base
with an authority and an empty path, so "a" against http://h is
http://h/a, not http://ha. FutureTask.runAndReset releases its runner
even when done() throws. ConcurrentHashMap's values view rejects a null
query and the plain keySet view rejects addAll even for an empty input.
The android-compat test cleanup resets dark mode and refreshes the
configuration, which a test order that ran ResumeConfigurationTest
first left dark.

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

* Java API review fixes: URI scheme grammar, ZZZZ parse, weak-map lookup

URI rejects a colon in the first segment of a relative path, and a
scheme must start with a letter and may hold "+" and "." (svn+ssh).
DateTimeFormatter parses ZZZZ as the localized GMT offset it prints.
WeakHashMap compares with the queried key's equals. Properties keeps the
empty entry a last line of only a backslash makes. The perf overlay
drops three rows master's pr/6045.json already re-recorded from the same
value, which the baseline gate refuses to see twice.

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

* Java API review fixes: full localized offset, stats toString, done stages

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>

* Java API review fixes: extreme instants, aggregate time conflicts, Month, 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>

* Java API review fixes: day-of-year conflicts, bound spliterators, atomic 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>

* Java API review fixes: extlang subtags, CHM entry-set add, racy blockUi 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>

* Java API review fixes: custom temporal units, parse past the end, snippet 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>

* Unmodifiable lists reject every mutation, stack traces print suppressed throwables

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

* Map.of views reject clear, initializr build test prints the end of a failed build

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

* Offset-only parses, MessageFormat clones its subformats, async stages use defaultExecutor

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

* usePattern keeps zero-width advancement, reversed views snapshot aliased input

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

* Zero offsets print as zero, ISO instants need offset minutes, U+180E is not white space

Drops the windows-x64 recursion rebaseline that master's baseline fold superseded.

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

* A continuation can join a nested dependent, CHM view removeIf keeps replaced mappings

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

* Regex by code point with Unicode tables; randomUUID needs a secure source

- Pattern matches, repeats and backtracks by code point, so "." and a
  class take a whole surrogate pair, and classes hold code points above
  U+FFFF.
- Scripts, blocks and general categories, and UNICODE_CHARACTER_CLASS
  ((?U)), are answered from the generated Unicode 15.0 tables in
  UnicodeTables rather than refused.
- UUID.randomUUID throws without a secure random source instead of
  falling back to a clock-seeded generator.
- ChoiceFormat writes an infinite limit as "<" explicitly rather than
  through a NaN comparison ParparVM answers differently.

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

* PMD fixes in the regex engine; rebaseline Flutter size for the Unicode tables

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

* Recalibrate linux x64 translator and objectAllocation perf rows

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

* Regex review: pairs in escapes and quotes, JDK search rule, tables for every property

- A search skips the positions inside a surrogate pair when the pattern
  names a supplementary code point or a surrogate, as the JDK's StartS
  does, so a negated class no longer matches half a pair.
- Two backslash-u escapes spelling a pair are one code point, and
  \Q...\E quotes code points, inside a class and out (Pattern.quote of
  an emoji matched nothing).
- The JDK's binary properties and the general categories answer from
  UnicodeTables for all of Unicode; IsWhite_Space no longer takes
  U+001C-U+001F, and a case category under CASE_INSENSITIVE takes Lu, Ll
  and Lt as on the JDK.
- Ports/CLDC11 Random: a no-break space in a comment failed an ASCII
  compile.

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

* Regex review 2: properties skip pair halves, caseless back references and classes, marks in words

- A pattern with a Unicode property or a (?U) shorthand skips the
  positions inside a pair, as the JDK's search does, so [^\p{L}] no
  longer takes half a supplementary letter.
- A caseless back reference compares code points.
- A caseless Unicode class also tries the lower form of the upper one,
  so (?iu)[a-z] takes U+0131 and U+017F as on the JDK.
- \b and \B count a non-spacing mark after a letter or digit as part of
  the word, and read the lone high half before a position inside a pair.
- usePattern keeps the match and drops its groups; group(0) is null.
- \p{all}.

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

* Regex review 3: unbounded single-atom lookbehind, quantified \R keeps its pair

- A lookbehind may repeat one character without bound, as on JDK 21
  ("(?<=a+)b"); a group repeated without bound or a back reference
  inside one is still refused, as there.
- A quantifier repeats \R whole, so each round takes \r\n as a pair.
- Code comments on the JDK parser accidents left alone: a leading {1},
  x{1}{2}, and [a&&&b].

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

* Regex review 4 (fuzzing): escaped pairs, COMMENTS before a suffix, folded class members

- An escaped supplementary character is one atom under a quantifier.
- COMMENTS mode skips whitespace before the ? or + of a quantifier.
- A single class member under UNICODE_CASE also stands for its folded
  form, so (?iu)[ı] takes "I" as on the JDK.
- A possessive repeat of an empty group takes its round and sets it.
- (?) is refused.
- Code comments on the JDK accidents left alone: which positions inside
  a pair its search accepts, the inner groups of repeated empty groups,
  and its && grammar.

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

* Rebaseline Flutter linux size for the regex code-point work

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

* Rebase the size and perf overlays onto master's #6059

#6059 rebaselined the JavaScript and Linux gallery size rows from the
same values this PR did, so those rows are dropped here to be measured
again on top of it. The x64 translator override starts from the row as
master now reads it, after #6059 removed the stale #5976 entry.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
shai-almog and others added 3 commits October 22, 2026 21:48
…odename One

swing-compat (java.awt, javax.swing, java.beans, javax.imageio and a SwingX
subset) is authored already relocated under com.codename1.desktopcompat;
javafx-compat is authored under the javafx names and relocated at build time.
desktop-compat-runtime holds what both layers share, including shims for the
host-backed JDK APIs a device lacks (java.io.File, java.net.URL,
java.nio.file, ResourceBundle, java.util.logging, java.util.prefs).
fxml-compiler turns FXML and JavaFX CSS into code and tables at build time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ClassRelocator applies every active layer in one pass; CompatRewrites
redirects the JDK members a device cannot have; the compliance check reports
unsupported desktop API under its original name. remap-compat and
import-desktop-project in Maven and Gradle, with the archetype wiring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shai-almog
shai-almog force-pushed the desktop-compat-layer branch from b9f0a19 to a29fff5 Compare October 22, 2026 18:49
shai-almog and others added 9 commits October 22, 2026 21:56
…s Closeable

A stream bundle is UTF-8 when its bytes are well-formed UTF-8 and ISO-8859-1
otherwise, as the JDK has read them since Java 9. The compliance report no
longer reverses a shim whose target is itself a JDK class.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ugaring, doc snippet roles

The four core-unittests and AndroidDesugaringDependencyTest covered the
core JDK host and the nio desugaring this PR no longer has. The nio
desugar_jdk_libs variant clashed with the Flutter Android build
(DartList.reversed), so AndroidGradleBuilder is master's again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he JS gallery sizes

dart.core.DateTime named java.util.regex, which no ParparVM target has and
nothing relocates in an ordinary application: every native Flutter build
failed on a missing java_util_regex_Pattern.h. It now uses
com.codename1.util.regex, as RegExp already did.

The PR's flutter-bench overlay justified the JavaAPI growth that moved to
#6044; its linux rows are dropped and the javascript rows recalibrated from
this PR's first gallery run on top of #6044 and #6055.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Android API 35 gives java.util.List a reversed() answering a List, and
every Flutter plugin class extending DartList (dio's Interceptors) failed
to compile in the generated Android project. Dart's reversed getter is
now dartReversed() in Java; the transpiler emits that name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uild

A reactor build that stops before packaging (mvn test over several
modules, as the Java 8 CI leg runs) resolves the runtime to its
target/classes directory, and the remap found no runtime jar. The
directory is now read like the jar, leaving out com/codename1/impl the way
the module's jar does.

Also rebaselines the android and linux gallery sizes from their first run
on top of #6044 and #6055.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Command.equals compares names, so the cancel and accept buttons must be
told apart by identity; master's #6052 tripped the forbidden-PMD gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	CodenameOne/src/com/codename1/impl/FileDialogSupport.java
#	maven/dart-runtime/src/main/java/dart/core/DartList.java
#	maven/dart-runtime/src/main/java/dart/core/DateTime.java
#	maven/dart-runtime/src/test/java/dart/core/DartCoreSemanticsTest.java
#	maven/dart-transpiler/src/main/java/com/codename1/dart/transpiler/codegen/JavaEmitter.java
A collection that cannot stop a thread records a root miss and skips the
sweep, then names each missed thread with pthread_getname_np. The thread
it could not stop is usually one that is exiting: markDeadThread
deregisters it and the pthread ends, so the recorded handle can name a
thread that no longer exists, and glibc reads its freed descriptor. The
bulk conformance run, whose pool checks start and retire many threads,
crashed with SIGSEGV in this diagnostic right after the skip line
(vm-tests, StringBuilderGrowthApp, exit 139).

The name is now read only for a handle still registered in allThreads,
under the critical section markDeadThread takes, and blocked threads are
released before that lock is taken.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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