Skip to content

chore: Improve Utils.Streams.asStream and Utils.Streams.asList - #48

Merged
mlakov merged 1 commit into
mainfrom
chore/minor-improvements
Oct 23, 2026
Merged

mlakov merged 1 commit into
mainfrom
chore/minor-improvements

Conversation

@mlakov

@mlakov mlakov commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Handle Null Inputs in Stream Utilities

Bug Fix

🐛 Updated the ORD stream utilities to handle null inputs safely. asStream and asList now return empty results instead of throwing a NullPointerException, while preserving existing behavior for non-null inputs.

Changes

  • cds-feature-ord/src/main/java/com/sap/cds/feature/ord/common/Utils.java: Added null checks so Streams.asStream(null) returns an empty stream and Streams.asList(null) returns an empty immutable list.
  • cds-feature-ord/src/test/java/com/sap/cds/feature/ord/common/UtilsTest.java: Added test coverage for null inputs to both stream conversion utilities.
  • 🔄 Regenerate and Update Summary
PR Bot Information

Version: 1.33.12

  • LLM: gpt-5.6-sol
  • Output Template: Default Template
  • Correlation ID: a7bb63b0-ce99-11f1-93ec-0d8a9d529e92
  • File Content Strategy: Full file content
  • Event Trigger: pull_request.opened
  • Summary Prompt: Default Prompt

@mlakov
mlakov requested a review from InaGlushkova October 23, 2026 04:24

@hyperspace-pr-bot hyperspace-pr-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No substantive correctness or maintainability issues found in the changes. The null handling is consistent and covered by tests.

PR Bot Information

Version: 1.33.12

  • Correlation ID: a7bb63b0-ce99-11f1-93ec-0d8a9d529e92
  • File Content Strategy: Full file content
  • LLM: gpt-5.6-sol
  • Event Trigger: pull_request.opened

@mlakov
mlakov merged commit 306bbfb into main Oct 23, 2026
8 checks passed
@mlakov
mlakov deleted the chore/minor-improvements branch October 23, 2026 06:18
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