@@ -36,10 +36,10 @@ public void injectServices(ServiceRegistryImplementor serviceRegistry) {
3636
3737 @ Override
3838 public <T > void put (Key <T > key , T instance ) {
39- final ContextInternal context = ContextInternal . current ();
39+ final io . vertx . core . Context context = Vertx . currentContext ();
4040 if ( context != null ) {
4141 if ( trace ) LOG .tracef ( "Putting key,value in context: [%1$s, %2$s]" , key , instance );
42- context .localContextData (). put ( key , instance );
42+ context .putLocal ( key , instance );
4343 }
4444 else {
4545 if ( trace ) LOG .tracef ( "Context is null for key,value: [%1$s, %2$s]" , key , instance );
@@ -49,10 +49,9 @@ public <T> void put(Key<T> key, T instance) {
4949
5050 @ Override
5151 public <T > T get (Key <T > key ) {
52- final ContextInternal context = ContextInternal . current ();
52+ final io . vertx . core . Context context = Vertx . currentContext ();
5353 if ( context != null ) {
54- @ SuppressWarnings ("unchecked" )
55- T local = (T ) context .localContextData ().get ( key );
54+ T local = context .getLocal ( key );
5655 if ( trace ) LOG .tracef ( "Getting value %2$s from context for key %1$s" , key , local );
5756 return local ;
5857 }
@@ -64,9 +63,9 @@ public <T> T get(Key<T> key) {
6463
6564 @ Override
6665 public void remove (Key <?> key ) {
67- final ContextInternal context = ContextInternal . current ();
66+ final io . vertx . core . Context context = Vertx . currentContext ();
6867 if ( context != null ) {
69- boolean removed = context .localContextData (). remove ( key ) != null ;
68+ boolean removed = context .removeLocal ( key );
7069 if ( trace ) LOG .tracef ( "Key %s removed from context: %s" , key , removed );
7170 }
7271 else {
0 commit comments