Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

This PR addresses a series of SpotBugs warnings related to UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR by adding appropriate null checks and defensive coding practices (e.g., assigning mutable fields to local variables before checking). It also updates the CI quality report script to enforce this rule, ensuring future regressions are caught.

Files modified:

  • CodenameOne/src/com/codename1/impl/CodenameOneImplementation.java
  • CodenameOne/src/com/codename1/io/NetworkManager.java
  • CodenameOne/src/com/codename1/io/gzip/Tree.java
  • CodenameOne/src/com/codename1/ui/FontImage.java
  • CodenameOne/src/com/codename1/ui/scene/Node.java
  • CodenameOne/src/com/codename1/io/WebServiceProxyCall.java
  • CodenameOne/src/com/codename1/properties/PreferencesObject.java
  • CodenameOne/src/com/codename1/share/ShareService.java
  • CodenameOne/src/com/codename1/io/gzip/Inflate.java
  • CodenameOne/src/com/codename1/ui/plaf/StyleParser.java
  • CodenameOne/src/com/codename1/ui/animations/CommonTransitions.java
  • CodenameOne/src/com/codename1/charts/transitions/XYMultiSeriesTransition.java
  • CodenameOne/src/com/codename1/ui/animations/AnimationObject.java
  • .github/scripts/generate-quality-report.py

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

…force rule.

Addressed multiple null dereference issues reported by SpotBugs across several files:
- CodenameOneImplementation.java: Added local variable assignment and null check for logger.
- NetworkManager.java: Added local variable assignment and null check for threadInstance.
- Tree.java: Added null checks for stat_desc.
- FontImage.java: Added null checks for fnt.
- Node.java: Added null checks for scene and camera.
- WebServiceProxyCall.java: Added null checks for def and arguments.
- PreferencesObject.java: Added null check for bo and propertyIndex.
- ShareService.java: Added null check for original form.
- Inflate.java: Added null checks for blocks.
- StyleParser.java: Added null check for color.
- CommonTransitions.java: Added null checks for timeline, buffer, motion, and motion2.
- XYMultiSeriesTransition.java: Added null check for seriesTransitions.
- AnimationObject.java: Added setTimeNotNull method and usage.

Updated .github/scripts/generate-quality-report.py to treat UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR as an error.
@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.

Added null checks to dereferenced fields in:
- CodenameOneImplementation.java
- NetworkManager.java
- Tree.java
- FontImage.java
- Node.java
- WebServiceProxyCall.java
- PreferencesObject.java
- ShareService.java
- Inflate.java
- StyleParser.java
- CommonTransitions.java
- XYMultiSeriesTransition.java
- XYSeriesTransition.java
- XYValueSeriesTransition.java
- XYChart.java
- AnimationObject.java
- Component.java

Updated .github/scripts/generate-quality-report.py to enforce this rule.
@shai-almog
Copy link
Collaborator

shai-almog commented Dec 24, 2025

iOS screenshot updates

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

  • 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: 340 seconds
  • Compilation Time: 78 seconds

Detailed Performance Metrics

Metric Duration
Build Time Statistics
Setup & Unzip 35659 ms
Extract Extensions 22 ms
Google Services Setup 2 ms
Scan Classes 434 ms
Extract Libs 590 ms
Inject Build Hints 47 ms
Generate Unit Tests 3 ms
Generate Stubs 1113 ms
Compile Stubs 2647 ms
Generate Icons 1484 ms
Prepare ParparVM 194 ms
ParparVM Execution 188447 ms
Post-VM Setup 297 ms
CocoaPods 8549 ms
Finalize 69 ms
Total Time 239560 msMaven Overhead : 101000 ms
CocoaPods Install (Script) 1000 ms
Simulator Boot (Run) 85000 ms
App Install 31000 ms
App Launch 16000 ms
Test Execution 192000 ms

…tions.

Addressed missed null checks in:
- RequestBuilder.java: Added null checks for response and list.
- DateSpinner.java: Added null check for day field.

This builds upon previous fixes to enforce the rule in CI.
@github-actions
Copy link

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

@shai-almog
Copy link
Collaborator

shai-almog commented Dec 24, 2025

Compared 30 screenshots: 30 matched.

Native Android coverage

  • 📊 Line coverage: 24.46% (2620/10710 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 24.23% (12234/50499), branch 15.25% (712/4668), complexity 17.32% (734/4237), method 32.40% (589/1818), 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.46% (2620/10710 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 24.23% (12234/50499), branch 15.25% (712/4668), complexity 17.32% (734/4237), method 32.40% (589/1818), 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 shai-almog marked this pull request as ready for review December 24, 2025 07:38
@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 7af2bce into master Dec 24, 2025
15 of 16 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