Skip to content

Commit

Permalink
Switch isEmpty() to .isPresent() for Optionals Type (#939)
Browse files Browse the repository at this point in the history
*Issue #, if available:*
Main-build Enablement E2E tests started failing starting from this
[PR](#899).
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.

Co-authored-by: Min Xia <xiami@amazon.com>
  • Loading branch information
harrryr and mxiamxia authored Oct 30, 2024
1 parent e4e5725 commit 409d1d4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ private static void setRemoteResourceTypeAndIdentifier(SpanData span, Attributes
remoteResourceIdentifier = getDbConnection(span);
}

if (cloudformationPrimaryIdentifier.isEmpty()) {
if (!cloudformationPrimaryIdentifier.isPresent()) {
cloudformationPrimaryIdentifier = remoteResourceIdentifier;
}

Expand Down

0 comments on commit 409d1d4

Please sign in to comment.