Skip to content

Commit

Permalink
[Draft] to fix #1073 and quarkusio/quarkus#22433
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanne authored and gavinking committed Jan 13, 2022
1 parent 2098d18 commit e89a6e4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void injectServices(ServiceRegistryImplementor serviceRegistry) {
public <T> void put(Key<T> key, T instance) {
final io.vertx.core.Context context = Vertx.currentContext();
if ( context != null ) {
context.put( key, instance );
context.putLocal( key, instance );
}
else {
throw LOG.notVertxContextActive();
Expand All @@ -47,7 +47,7 @@ public <T> void put(Key<T> key, T instance) {
public <T> T get(Key<T> key) {
final io.vertx.core.Context context = Vertx.currentContext();
if ( context != null ) {
return (T) context.get( key );
return (T) context.getLocal( key );
}
else {
return null;
Expand All @@ -58,7 +58,7 @@ public <T> T get(Key<T> key) {
public void remove(Key<?> key) {
final io.vertx.core.Context context = Vertx.currentContext();
if ( context != null ) {
context.remove( key );
context.removeLocal( key );
}
}

Expand Down

0 comments on commit e89a6e4

Please sign in to comment.