Skip to content

timing.ui: Fix null related errors and warning#396

Open
arfio wants to merge 1 commit intoeclipse-tracecompass:masterfrom
arfio:segment-store-fix
Open

timing.ui: Fix null related errors and warning#396
arfio wants to merge 1 commit intoeclipse-tracecompass:masterfrom
arfio:segment-store-fix

Conversation

@arfio
Copy link
Copy Markdown
Contributor

@arfio arfio commented Apr 13, 2026

What it does

timing.ui: Some errors related to com.google.common.collect.Iterables were fixed as well as other type annotation warnings.

How to test

Compile errors disappear with the patch, the changes should not affect functionality.

Follow-ups

N/A

Review checklist

  • As an author, I have thoroughly tested my changes and carefully followed the instructions in this template

Summary by CodeRabbit

  • Refactor
    • Enhanced internal null-safety handling in segment store data processing to improve code robustness and type correctness.

Signed-off-by: Arnaud Fiorini <fiorini.arnaud@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3bad5295-6c3d-4a9e-a55c-49cfd9b44298

📥 Commits

Reviewing files that changed from the base of the PR and between 32f6b03 and 4d4ad0c.

📒 Files selected for processing (1)
  • analysis/org.eclipse.tracecompass.analysis.timing.ui/src/org/eclipse/tracecompass/internal/analysis/timing/ui/views/segmentstore/table/SegmentStoreContentProvider.java

📝 Walkthrough

Walkthrough

The SegmentStoreContentProvider.SegmentStoreWithRange class undergoes nullability annotation updates. Changes enforce non-null validation on cached iterables, adjust generic type declarations from @NonNull ISegment to nullable ISegment variants, modify comparator type signatures, and remove redundant cast-related comments while updating cast implementations for nullability correctness.

Changes

Cohort / File(s) Summary
Nullability Annotation Updates
analysis/org.eclipse.tracecompass.analysis.timing.ui/src/org/eclipse/tracecompass/internal/analysis/timing/ui/views/segmentstore/table/SegmentStoreContentProvider.java
Modified generic type declarations and nullability handling in SegmentStoreWithRange; added Objects.requireNonNull enforcement for cached iterable; revised iterator and comparator type signatures to reflect nullable element semantics; removed commented FIXME block and adjusted type-safe casts.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Types now safer, nulls are clear,
Annotations whisper without fear,
Where once assumptions ruled the way,
Nullability saves the day,
Comparators, iterators aligned,
Safety and clarity intertwined!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: fixing null-related errors and warnings in the timing.ui component, which aligns with the detailed nullability handling updates in the code.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant