Skip to content

Conversation

@shai-almog
Copy link
Collaborator

Motivation

  • Clear SpotBugs "Private method is never called" (UPM) findings by removing unused private helper methods across several UI, layout, graphics and IO classes.
  • Prevent regressions by treating the SpotBugs rule UPM_UNCALLED_PRIVATE_METHOD as a forbidden violation so future occurrences will fail the quality gate.

Description

  • Removed unused private helper methods from the following modules: CacheMap, Display, Graphics, LinearGradientPaint, TextSelection, URLImage, GeneralPath, LayeredLayout, LayoutStyle, CodenameOneMiGComponentWrapper, MigLayout, Border, UIManager, and SpinnerNode (15 files updated).
  • Commented out or deleted small, clearly-unused private methods and helpers to silence UPM warnings and keep code paths intact for runtime behavior.
  • Updated the quality enforcement script .github/scripts/generate-quality-report.py to add UPM_UNCALLED_PRIVATE_METHOD to the forbidden_rules set so SpotBugs UPM findings will cause the build to fail.
  • Created a single commit containing the code removals and the quality-report script change.

Testing

  • No automated tests were executed as part of this change; CI will exercise the changes and will now fail if SpotBugs reports UPM_UNCALLED_PRIVATE_METHOD violations.

Codex Task

@shai-almog
Copy link
Collaborator Author

shai-almog commented Jan 10, 2026

Compared 30 screenshots: 30 matched.

Native Android coverage

  • 📊 Line coverage: 24.53% (2629/10717 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 24.24% (12248/50528), branch 15.22% (711/4672), complexity 17.31% (734/4241), method 32.58% (593/1820), class 34.32% (104/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.PushNotificationService – 0.00% (0/59 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 24.53% (2629/10717 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 24.24% (12248/50528), branch 15.22% (711/4672), complexity 17.31% (734/4241), method 32.58% (593/1820), class 34.32% (104/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.PushNotificationService – 0.00% (0/59 lines covered)

@shai-almog
Copy link
Collaborator Author

shai-almog commented Jan 10, 2026

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-arc — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-arc
    Preview info: JPEG preview quality 20; JPEG preview quality 20; downscaled to 603x1311.
    Full-resolution PNG saved as graphics-draw-arc.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.

  • 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: 273 seconds
  • Compilation Time: 102 seconds

Detailed Performance Metrics

Metric Duration
Build Time Statistics
Setup & Unzip 24568 ms
Extract Extensions 19 ms
Google Services Setup 2 ms
Scan Classes 447 ms
Extract Libs 1012 ms
Inject Build Hints 31 ms
Generate Unit Tests 1 ms
Generate Stubs 805 ms
Compile Stubs 2020 ms
Generate Icons 998 ms
Prepare ParparVM 185 ms
ParparVM Execution 162109 ms
Post-VM Setup 131 ms
CocoaPods 4661 ms
Finalize 14 ms
Total Time 197004 msMaven Overhead : 76000 ms
CocoaPods Install (Script) 1000 ms
Simulator Boot (Run) 62000 ms
App Install 15000 ms
App Launch 8000 ms
Test Execution 183000 ms

@github-actions
Copy link

github-actions bot commented Jan 10, 2026

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

@shai-almog shai-almog force-pushed the codex/fix-spotbugs-upm_uncalled_private_method-warnings branch from d892c32 to 48afb71 Compare January 10, 2026 19:01
@shai-almog shai-almog force-pushed the codex/fix-spotbugs-upm_uncalled_private_method-warnings branch from 48afb71 to 9e9d4a2 Compare January 11, 2026 02:33
@shai-almog shai-almog merged commit 77c3e9a into master Jan 11, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants