Skip to content

Commit

Permalink
Replace this lambda with method reference 'Objects::nonNull' (Sonar)
Browse files Browse the repository at this point in the history
  • Loading branch information
julianladisch committed Oct 12, 2024
1 parent ce87996 commit 9d00e60
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.UUID;
import javax.ws.rs.core.Response;
import org.apache.commons.io.IOUtils;
Expand Down Expand Up @@ -92,7 +93,7 @@ Future<Boolean> tenantExists(Context context, String tenantId){
var sql = "SELECT 1 FROM information_schema.tables WHERE table_schema=$1";
return postgresClient(context)
.selectSingle(sql, Tuple.of(PostgresClient.convertToPsqlStandard(tenantId)))
.map(row -> row != null)
.map(Objects::nonNull)
.onFailure(e -> log.error("{}: {}", sql, e.getMessage(), e));
}

Expand Down

0 comments on commit 9d00e60

Please sign in to comment.