Skip to content

Commit

Permalink
chore: Remove ternary if and use traditional one
Browse files Browse the repository at this point in the history
  • Loading branch information
talyssoncastro committed Dec 4, 2023
1 parent 491f95c commit 3ba4c3f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ trait ApiManagerFunctionality {
def source = Okio.source(response.entity.content)
def bufferedSource = Okio.buffer(source)
def dataOptional = query.parse(bufferedSource).data()
dataOptional.isPresent() ? dataOptional.get().assets : []
if (dataOptional.isPresent()) {
return dataOptional.get().assets
} else {
return Collections.emptyList()
}
}
}
}

0 comments on commit 3ba4c3f

Please sign in to comment.