feat: use Optional.ifPresent instead of an if Optional.ifPresent
This commit is contained in:
parent
c276641062
commit
743241984a
|
@ -570,10 +570,8 @@ public class BasicIndexingConverter {
|
||||||
if (retweetUserId.isPresent()) {
|
if (retweetUserId.isPresent()) {
|
||||||
builder.withNativeRetweet(retweetUserId.get(), sharedStatusId.get());
|
builder.withNativeRetweet(retweetUserId.get(), sharedStatusId.get());
|
||||||
|
|
||||||
if (inReplyToUserId.isPresent()) {
|
|
||||||
// Set IN_REPLY_TO_USER_ID_FIELD even if this is a retweet of a reply.
|
// Set IN_REPLY_TO_USER_ID_FIELD even if this is a retweet of a reply.
|
||||||
builder.withInReplyToUserID(inReplyToUserId.get());
|
inReplyToUserId.ifPresent(builder::withInReplyToUserID);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// If this is a retweet of a reply, we don't want to mark it as a reply, or override fields
|
// If this is a retweet of a reply, we don't want to mark it as a reply, or override fields
|
||||||
// set by the retweet logic.
|
// set by the retweet logic.
|
||||||
|
|
Loading…
Reference in New Issue