Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch isEmpty() to .isPresent() for Optionals Type #939

Merged
merged 2 commits into from
Oct 30, 2024
Merged

Conversation

harrryr
Copy link
Contributor

@harrryr harrryr commented Oct 29, 2024

Issue #, if available:
Main-build Enablement E2E tests started failing starting from this PR. It was due to the usage of isEmpty() for Optional datatypes, which is available only from Java 11

Description of changes:
Change .isEmpty() to .isPresent() for optional types

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@harrryr harrryr requested a review from a team as a code owner October 29, 2024 20:07
mxiamxia
mxiamxia previously approved these changes Oct 29, 2024
@harrryr harrryr force-pushed the fix-java-8-error branch 2 times, most recently from 97549dc to 0d85227 Compare October 29, 2024 21:48
@harrryr harrryr changed the title Switch isEmpty() to isPresent() Switch isEmpty() to .equals("") Oct 29, 2024
@harrryr harrryr force-pushed the fix-java-8-error branch 2 times, most recently from 6566ff5 to eddf39a Compare October 29, 2024 22:06
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.99%. Comparing base (09e6487) to head (f8a8fa9).
Report is 361 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@              Coverage Diff              @@
##               main     #939       +/-   ##
=============================================
- Coverage     85.71%   71.99%   -13.73%     
- Complexity       19      278      +259     
=============================================
  Files             3       21       +18     
  Lines            49      989      +940     
  Branches          5      144      +139     
=============================================
+ Hits             42      712      +670     
- Misses            3      233      +230     
- Partials          4       44       +40     

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

@harrryr harrryr changed the title Switch isEmpty() to .equals("") Switch isEmpty() to .isPresent() for Optionals Type Oct 30, 2024
@mxiamxia mxiamxia merged commit 409d1d4 into main Oct 30, 2024
4 checks passed
@mxiamxia mxiamxia deleted the fix-java-8-error branch October 30, 2024 18:36
@bjrara bjrara mentioned this pull request Oct 31, 2024
bjrara added a commit that referenced this pull request Oct 31, 2024
*Description of changes:*
1. [Switch isEmpty() to .isPresent() for Optionals Type
#939](#939)
1. [Comment out E2E Operator Test
#940](#940)
1. [Add Application Signals runtime metrics
#892](#892)
1. [Update Dockerfile for corretto-slim build
#924](#924)

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

---------

Co-authored-by: Michael He <[email protected]>
Co-authored-by: Ping Xiang <[email protected]>
Co-authored-by: Reno Seo <[email protected]>
Co-authored-by: Harry <[email protected]>
Co-authored-by: Min Xia <[email protected]>
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.

3 participants