Stefano Cordio

Results 595 comments of Stefano Cordio

> I want to acknowledge I've seen this but I wasn't able to spend time on this yet. It's high on my list. Thanks a lot for your efforts! No...

> What we need is an `AssertFactory` that expresses the `Type` it's expecting for its `createAssert` method. Locally, I introduced an interface that extends `AssertFactory` and defines the `getType` method....

> Locally, I introduced an interface that extends `AssertFactory` and defines the `getType` method. However, I've been holding that back because of the overall impact on the existing methods that...

I'm fine with `getType` on `AssertFactory`. I would maybe favor an `Optional` as a return type. I must admit I didn't understand how the other alternative would impact `InstanceOfAssertFactory`. Maybe...

> Evaluate the addition of a type similar to [`ParameterizedTypeReference`](https://github.com/spring-projects/spring-framework/blob/main/spring-core/src/main/java/org/springframework/core/ParameterizedTypeReference.java) and the corresponding method factories into `InstanceOfAssertFactories` We discussed that we'll wait for a concrete demand.

@snicoll could you try the latest changes? It should be in line with what we discussed, although I still need to spend some time on it for proper test coverage....

BTW, we already have `spring-core` in the test classpath so I can try to put together an integration test close to the usage pattern you expect.

I'm still unsure how much the Javadoc should elaborate on the concrete usage of the new `createAssert`. @snicoll I will merge the changes and release them as part of 3.26.0...

Thanks for reporting it, @IUSR. The root cause is the usage of `Date.from(Instant)` internally, which doesn't behave correctly when `actual` is a `Timestamp`. As a workaround, you can rely on...

I'm afraid we didn't fully solve the issue. Although the original example now works, a case with non-zero nanoseconds fails: ```java Instant instant = Instant.ofEpochSecond(0, 1); // 1970-01-01T00:00:00.000000001Z Timestamp timestamp...