pjfanning opened a new pull request, #512: URL: https://github.com/apache/pekko-persistence-r2dbc/pull/512
### Motivation Port of [akka/akka-persistence-r2dbc#458](https://github.com/akka/akka-persistence-r2dbc/pull/458) (`chore: Wrong function type in javadsl.R2dbcSession`). The code is copied from the akka-persistence-r2dbc 1.2.0 release, which is available under the Apache License, Version 2.0 as of 2026-10-24 (its LICENSE change date). `javadsl.R2dbcSession.select` and `selectOne` take a Scala `Function1` for the row mapper. Java callers can pass a lambda, but not a `java.util.function.Function` value. ### Modification `select` and `selectOne` take `java.util.function.Function[Row, A]`, matching `withSession` in the same class. ### Result The javadsl session uses Java functional types throughout. Java code written with lambdas (including the docs snippets) compiles unchanged. ### Tests - `sbt "core/testOnly *JavadslR2dbcSessionSpec"`: new Java helper `JavadslSessionSelect` passes a `java.util.function.Function` value; it does not compile before the fix (`java.util.function.Function<Row,String> cannot be converted to scala.Function1<Row,A>`) and the spec passes after it (PostgreSQL in docker) - `sbt core/test`: 359 succeeded, 0 failed - `sbt docs/Test/compile core/javafmtCheckAll core/headerCheck core/Test/headerCheck` - `sbt core/mimaReportBinaryIssues`: no issues. `R2dbcSession` is not in the 1.0.0 MiMa baseline; it first shipped in 2.0.0-M1 and is `@ApiMayChange`, so no excludes are needed. - The two new test files are new code (upstream added no test) and carry the standard ASF header, generated by `sbt headerCreate` with the `CopyrightHeader` change from #498. ### References Refs akka/akka-persistence-r2dbc#458 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
