Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

This change updates the PR CI workflow to run tests against JDK 8, 17, 21, and 25 using a matrix strategy. It ensures that reporting and artifact uploads are restricted to the default JDK 8 build to avoid duplication and noise. It also handles the different setup requirements for JDK 8 (requiring JavaFX) vs. newer JDKs.


PR created automatically by Jules for task 5236328697114802487 started by @shai-almog

Modified .github/workflows/pr.yml to use a matrix strategy for testing across multiple JDK versions.
Ensured that artifact generation, static analysis, and reporting steps are executed only for the default JDK 8 build.
Retained legacy JDK 8 setup (with JavaFX) while using setup-java@v4 for newer JDKs.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@github-actions
Copy link

github-actions bot commented Dec 18, 2025

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

Modified maven/core/pom.xml and vm/JavaAPI/pom.xml to use Maven properties for compiler source/target settings.
Added a 'modern-jdk' Maven profile activated on JDK 9+ to set compiler source/target to 1.8.
This resolves 'Source option 5 is no longer supported' errors when building with newer JDKs in the CI matrix.
@github-actions
Copy link

github-actions bot commented Dec 18, 2025

✅ ByteCodeTranslator Quality Report

Test & Coverage

  • Tests: 103 total, 0 failed, 0 skipped

Benchmark Results

  • Execution Time: 15721 ms

  • Hotspots (Top 20 sampled methods):

    • 49.77% com.codename1.tools.translator.Parser.isMethodUsed (1430 samples)
    • 8.98% java.lang.String.indexOf (258 samples)
    • 8.63% java.util.Hashtable.get (248 samples)
    • 7.34% java.util.ArrayList.indexOf (211 samples)
    • 3.93% com.codename1.tools.translator.BytecodeMethod.addToConstantPool (113 samples)
    • 2.96% java.lang.Object.hashCode (85 samples)
    • 1.91% com.codename1.tools.translator.Parser.addToConstantPool (55 samples)
    • 1.74% com.codename1.tools.translator.ByteCodeClass.calcUsedByNative (50 samples)
    • 1.39% com.codename1.tools.translator.Parser.cullMethods (40 samples)
    • 1.04% com.codename1.tools.translator.Parser.generateClassAndMethodIndexHeader (30 samples)
    • 0.84% com.codename1.tools.translator.BytecodeMethod.optimize (24 samples)
    • 0.84% java.lang.System.identityHashCode (24 samples)
    • 0.73% com.codename1.tools.translator.ByteCodeClass.markDependent (21 samples)
    • 0.70% java.io.FileOutputStream.writeBytes (20 samples)
    • 0.63% com.codename1.tools.translator.MultipleSignatureSet.containsSignature (18 samples)
    • 0.59% java.lang.StringBuilder.append (17 samples)
    • 0.45% org.objectweb.asm.ClassReader.readCode (13 samples)
    • 0.42% java.io.FileInputStream.open0 (12 samples)
    • 0.38% java.io.FileOutputStream.open0 (11 samples)
    • 0.38% com.codename1.tools.translator.BytecodeMethod.appendCMethodPrefix (11 samples)
  • ⚠️ Coverage report not generated.

Static Analysis

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

Generated automatically by the PR CI workflow.

@shai-almog
Copy link
Collaborator

shai-almog commented Dec 18, 2025

Android screenshot updates

Compared 30 screenshots: 29 matched, 1 updated.

  • graphics-draw-arc — updated screenshot. Screenshot differs (320x616 px, bit depth 8).

    graphics-draw-arc
    Preview info: JPEG preview quality 70; JPEG preview quality 70.
    Full-resolution PNG saved as graphics-draw-arc.png in workflow artifacts.

Native Android coverage

  • 📊 Line coverage: 25.20% (2688/10667 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 24.91% (12541/50336), branch 15.84% (735/4640), complexity 17.80% (751/4220), method 33.39% (606/1815), class 35.97% (109/303)
    • Lowest covered classes
      • com.codename1.impl.android.com.codename1.impl.android.AndroidContactsManager – 0.00% (0/400 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidImplementation$Video – 0.00% (0/168 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.IntentIntegrator – 0.00% (0/139 lines covered)
      • com.codename1.impl.android.util.com.codename1.impl.android.util.Base64 – 0.00% (0/117 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidImplementation$SocketImpl – 0.00% (0/77 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidTextureView – 0.00% (0/76 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidSurfaceView – 0.00% (0/73 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.LocalNotificationPublisher – 0.00% (0/65 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.FridaDetectionUtil – 0.00% (0/64 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidDB – 0.00% (0/57 lines covered)

Modified maven/parparvm/pom.xml to move the system dependency on tools.jar into a Maven profile active only for JDKs < 9.
This prevents the 'Could not find artifact com.sun:tools:jar:1.5.0' error on newer JDKs (like 17+) where tools.jar has been removed.
Modified maven/parparvm/pom.xml to use Maven properties for the javac task source/target versions.
Added a 'modern-jdk' Maven profile activated on JDK 9+ to override these properties to 1.8.
This resolves the 'Source option 5 is no longer supported' error in the ParparVM build when running on newer JDKs.
Modified .github/workflows/pr.yml to pass -Djavac.source=1.8 -Djavac.target=1.8 to Ant commands when running on JDK 9+ (i.e., non-JDK 8 builds).
This overrides the project.properties setting (1.6) which caused 'Source option 6 is no longer supported' errors on modern JDKs, while preserving the legacy configuration for the default JDK 8 pipeline.
Moved the 'Build CLDC11 JAR' step before 'Build with Ant' (test-javase) in pr.yml.
This ensures the CLDC11 jar is pre-built with the correct compiler options (1.8) on modern JDKs, preventing the 'CodenameOneCLI' test runner from failing when attempting to rebuild it with default (1.6) options.
@shai-almog
Copy link
Collaborator

shai-almog commented Dec 18, 2025

iOS screenshot updates

Compared 30 screenshots: 23 matched, 6 updated, 1 missing reference.

  • BrowserComponent — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    BrowserComponent
    Preview info: Preview provided by instrumentation.
    Full-resolution PNG saved as BrowserComponent.png in workflow artifacts.

  • graphics-draw-gradient — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-gradient
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-draw-gradient.png in workflow artifacts.

  • graphics-draw-round-rect — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-draw-round-rect.png.

    graphics-draw-round-rect
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-draw-round-rect.png in workflow artifacts.

  • graphics-draw-string — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-string
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 422x918.
    Full-resolution PNG saved as graphics-draw-string.png in workflow artifacts.

  • graphics-draw-string-decorated — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-string-decorated
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 603x1311.
    Full-resolution PNG saved as graphics-draw-string-decorated.png in workflow artifacts.

  • graphics-fill-arc — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-fill-arc
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-fill-arc.png in workflow artifacts.

  • kotlin — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    kotlin
    Preview info: Preview provided by instrumentation.
    Full-resolution PNG saved as kotlin.png in workflow artifacts.

Benchmark Results

  • VM Translation Time: 338 seconds
  • Compilation Time: 84 seconds

Modified .github/workflows/pr.yml to append -Dspotbugs.skip=true to the Maven command for all JDK versions except 8.
This prevents build failures on newer JDKs (like JDK 25) caused by SpotBugs incompatibility with modern class file versions, while ensuring static analysis remains active for the default pipeline.
@shai-almog shai-almog marked this pull request as ready for review December 19, 2025 09:55
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@shai-almog shai-almog merged commit f4e9392 into master Dec 19, 2025
17 of 19 checks passed
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