Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

Resolved Spotbugs warnings by adding the final modifier to several static fields and one instance field across ColorUtil, Cookie, Log, JavascriptContext, LocationRequest, DocumentInfo, and PlatformDefaults. These fields are constants or effectively final, and explicitly marking them as such prevents accidental modification. Verified changes by running relevant core unit tests (CookieTest).


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

This commit resolves multiple "Field isn't final but should be" warnings identified by Spotbugs. The `final` modifier has been added to the following fields:

- `ColorUtil`: `LTGRAY`, `BLUE`, `BLACK`, `WHITE`, `CYAN`, `GREEN`, `YELLOW`, `MAGENTA`, `GRAY`
- `Cookie`: `STORAGE_NAME`
- `Log`: `REPORTING_NONE`, `REPORTING_DEBUG`, `REPORTING_PRODUCTION`
- `JavascriptContext`: `jsLookupTable`
- `LocationRequest`: `PRIORITY_HIGH_ACCUARCY`, `PRIORITY_MEDIUM_ACCUARCY`, `PRIORITY_LOW_ACCUARCY`
- `DocumentInfo`: `TYPE_HTML`, `TYPE_IMAGE`, `TYPE_CSS`
- `PlatformDefaults`: `VISUAL_PADDING_PROPERTY`

These fields are intended to be constants (or effectively final in the case of `jsLookupTable`) and enforcing immutability improves thread safety and code clarity. Existing typos in `LocationRequest` field names are preserved for backward compatibility.
@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 20, 2025

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

@shai-almog
Copy link
Collaborator

shai-almog commented Dec 20, 2025

Compared 30 screenshots: 30 matched.

Native Android coverage

  • 📊 Line coverage: 24.95% (2661/10667 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 24.53% (12348/50336), branch 15.52% (720/4640), complexity 17.58% (742/4220), method 32.95% (598/1815), class 34.98% (106/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)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 24.95% (2661/10667 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 24.53% (12348/50336), branch 15.52% (720/4640), complexity 17.58% (742/4220), method 32.95% (598/1815), class 34.98% (106/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)

@shai-almog
Copy link
Collaborator

shai-almog commented Dec 20, 2025

iOS screenshot updates

Compared 30 screenshots: 24 matched, 5 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.

  • 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: 272 seconds
  • Compilation Time: 49 seconds

Detailed Performance Metrics

Metric Duration
Build Time Statistics
Setup & Unzip 28590 ms
Extract Extensions 19 ms
Google Services Setup 5 ms
Scan Classes 495 ms
Extract Libs 955 ms
Inject Build Hints 47 ms
Generate Unit Tests 3 ms
Generate Stubs 812 ms
Compile Stubs 2082 ms
Generate Icons 836 ms
Prepare ParparVM 175 ms
ParparVM Execution 150472 ms
Post-VM Setup 127 ms
CocoaPods 4469 ms
Finalize 37 ms
Total Time 189125 msMaven Overhead : 83000 ms
CocoaPods Install (Script) 1000 ms
Simulator Boot (Run) 42000 ms
App Install 16000 ms
App Launch 4000 ms
Test Execution 137000 ms

This commit resolves multiple "Field isn't final but should be" warnings identified by Spotbugs. The `final` modifier has been added to the following fields:

- `ColorUtil`: `LTGRAY`, `BLUE`, `BLACK`, `WHITE`, `CYAN`, `GREEN`, `YELLOW`, `MAGENTA`, `GRAY`
- `Cookie`: `STORAGE_NAME`
- `Log`: `REPORTING_NONE`, `REPORTING_DEBUG`, `REPORTING_PRODUCTION`
- `JavascriptContext`: `DEBUG`
- `LocationRequest`: `PRIORITY_HIGH_ACCUARCY`, `PRIORITY_MEDIUM_ACCUARCY`, `PRIORITY_LOW_ACCUARCY`
- `DocumentInfo`: `TYPE_HTML`, `TYPE_IMAGE`, `TYPE_CSS`
- `PlatformDefaults`: `VISUAL_PADDING_PROPERTY`

These fields are intended to be constants (or effectively final in the case of `DEBUG`) and enforcing immutability improves thread safety and code clarity. Existing typos in `LocationRequest` field names are preserved for backward compatibility.
@shai-almog shai-almog marked this pull request as ready for review December 20, 2025 07:41
@shai-almog shai-almog merged commit c4df216 into master Dec 20, 2025
14 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