Skip to content

fix(entities): remove Objects.requireNonNull from AbstractTrend const…#820

Merged
mivek merged 1 commit into
mainfrom
fix/abstract-trend-constructor-throw
Jul 8, 2026
Merged

fix(entities): remove Objects.requireNonNull from AbstractTrend const…#820
mivek merged 1 commit into
mainfrom
fix/abstract-trend-constructor-throw

Conversation

@mivek

@mivek mivek commented Jul 8, 2026

Copy link
Copy Markdown
Owner

…ructor

Removes the Objects.requireNonNull(type) call from the AbstractTrend constructor which could throw NullPointerException, leaving the object partially initialized and vulnerable to finalizer attacks (CT_CONSTRUCTOR_THROW).

The type field is assigned directly now. Since WeatherChangeType is an enum and all subclasses pass concrete values, null is never expected.

…ructor

Removes the Objects.requireNonNull(type) call from the AbstractTrend
constructor which could throw NullPointerException, leaving the object
partially initialized and vulnerable to finalizer attacks
(CT_CONSTRUCTOR_THROW).

The type field is assigned directly now. Since WeatherChangeType is an
enum and all subclasses pass concrete values, null is never expected.
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Please check on sonarcloud https://sonarcloud.io/project/pull_requests_list?id=io.github.mivek%3AmetarParser that the PR does not add any issue.

@sonarqubecloud

sonarqubecloud Bot commented Jul 8, 2026

Copy link
Copy Markdown

@mivek mivek merged commit f4cf4d2 into main Jul 8, 2026
9 checks passed
@mivek mivek deleted the fix/abstract-trend-constructor-throw branch July 8, 2026 21:49
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 3.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

1 participant