Skip to content

Conversation

DavideD
Copy link
Member

@DavideD DavideD commented May 23, 2024

Fix #1907

Comment on lines +206 to +220
testOnContext.vertx()
.executeBlocking(
// schema generation is a blocking operation and so it causes an
// exception when run on the Vert.x event loop. So call it using
// Vertx.executeBlocking()
promise -> startFactoryManager( promise, confSupplier ),
event -> {
if ( event.succeeded() ) {
future.complete( null );
}
else {
future.completeExceptionally( event.cause() );
}
}
);

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [Vertx.executeBlocking](1) should be avoided because it has been deprecated.
return 0L;
}
else {
return Long.parseLong( s.replaceAll( "-", "" ) );

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException

Potential uncaught 'java.lang.NumberFormatException'.
* @return a {@link Uni} with the expected exception thrown by the uni we were testing.
*/
public static <U extends Throwable> Uni<U> assertThrown(Class<U> expectedException, Uni<?> uni) {
return uni.onItemOrFailure().transform( (s, e) -> {

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 's' is never used.
}

public static void test(VertxTestContext context, CompletionStage<?> work) {
work.whenComplete( (res, err) -> {

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'res' is never used.
}

public static void test(VertxTestContext context, Uni<?> uni) {
uni.subscribe().with( res -> context.completeNow(), context::failNow );

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'res' is never used.
protected void addServices(StandardServiceRegistryBuilder builder) {
}

protected void configureServices(StandardServiceRegistry registry) {

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'registry' is never used.
return configuration.buildSessionFactory( registry );
}

protected void addServices(StandardServiceRegistryBuilder builder) {

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'builder' is never used.
@DavideD DavideD merged commit 7e318e4 into hibernate:main May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test integration between Hibernate Reactive and Validator
1 participant