Skip to content

Make filter Context nullability explicit - #2208

Open
blihio wants to merge 1 commit into
pedroSG94:masterfrom
blihio:fix/crop-filter-context-nullability
Open

blihio wants to merge 1 commit into
pedroSG94:masterfrom
blihio:fix/crop-filter-context-nullability

Conversation

@blihio

@blihio blihio commented Sep 29, 2026

Copy link
Copy Markdown

Summary

CropFilterRender accepted a nullable Kotlin Context while passing it to Java code that dereferences the context as non-null. This change makes the nullability contract explicit across the filter initialization path while preserving existing behavior for valid calls.

Changes

  • Add @NonNull to the Java filter initialization parameters.
  • Add @NonNull to GlUtil.getStringFromRaw.
  • Change CropFilterRender.initGlFilter from Context? to Context.
  • Change MainRender.context to a non-null lateinit property.
  • Add a regression test covering non-null context forwarding.

Validation

.\gradlew.bat :encoder:testDebugUnitTest

The build completed successfully:
BUILD SUCCESSFUL

The regression test BaseFilterRenderTest.initGlForwardsContextToFilter passed.
Related to #2207

@blihio

blihio commented Sep 29, 2026

Copy link
Copy Markdown
Author

The Android CI workflow is awaiting maintainer approval.
Could a maintainer please approve the workflow run for this pull request?

This branch has not been deployed

No deployments
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