Skip to content

Add @Required annotation#1556

Closed
ghost wants to merge 4 commits intomainfrom
unknown repository
Closed

Add @Required annotation#1556
ghost wants to merge 4 commits intomainfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Feb 23, 2026

Adds a new @Required annotation to the model package for use in marking attributes in model classes as "required". This is so we can annotate attributes of our model classes that are expected to be present on every instance of the object, so developers can safely access without any explicit null checks. Meant to be a drop-in replacement for in-line code comments or javadocs that state the same (but apply no actual enforcement at runtime)

Category (place an x in each of the [ ])

  • bolt (Bolt for Java)
  • bolt-{sub modules} (Bolt for Java - optional modules)
  • slack-api-client (Slack API Clients)
  • slack-api-model (Slack API Data Models)
  • slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
  • slack-app-backend (The primitive layer of Bolt for Java)

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.

@salesforce-cla
Copy link

Thanks for the contribution! Before we can merge this, we need @fst-john to sign the Salesforce Inc. Contributor License Agreement.

@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 35.71429% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.28%. Comparing base (797d1c1) to head (61394ab).

Files with missing lines Patch % Lines
...om/slack/api/util/json/RequiredAdapterFactory.java 35.71% 14 Missing and 4 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1556      +/-   ##
============================================
- Coverage     73.28%   73.28%   -0.01%     
- Complexity     4513     4520       +7     
============================================
  Files           477      478       +1     
  Lines         14274    14302      +28     
  Branches       1487     1492       +5     
============================================
+ Hits          10461    10481      +20     
- Misses         2922     2925       +3     
- Partials        891      896       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ghost ghost marked this pull request as ready for review February 24, 2026 18:00
@ghost ghost self-requested a review as a code owner February 24, 2026 18:00
@ghost
Copy link
Author

ghost commented Feb 24, 2026

Apparently to get the "CLA is signed" check to pass we need to close this PR and open a new one; so doing that!

@ghost ghost closed this Feb 24, 2026
@ghost ghost reopened this Feb 24, 2026
@vegeris vegeris closed this Feb 24, 2026
@vegeris vegeris reopened this Feb 24, 2026
Repository owner closed this by deleting the head repository Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants