From e1f04d52a842e69ac942de563ccc2df536d2e409 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Fri, 6 Dec 2024 15:23:22 -0600 Subject: [PATCH] Fix ClientScope to be in every application definition --- .../modules/compat/interceptors/ClientScopeListener.java | 4 +--- .../java/ortus/boxlang/modules/compat/ClientScopeTest.java | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/ortus/boxlang/modules/compat/interceptors/ClientScopeListener.java b/src/main/java/ortus/boxlang/modules/compat/interceptors/ClientScopeListener.java index befb54c..72dfe10 100644 --- a/src/main/java/ortus/boxlang/modules/compat/interceptors/ClientScopeListener.java +++ b/src/main/java/ortus/boxlang/modules/compat/interceptors/ClientScopeListener.java @@ -59,8 +59,7 @@ public class ClientScopeListener extends BaseInterceptor { * BIF Invocation */ @InterceptionPoint - public void onApplicationStart( IStruct interceptData ) { - + public void onApplicationDefined( IStruct interceptData ) { // Check for existing client context BaseApplicationListener listener = ( BaseApplicationListener ) interceptData.get( Key.listener ); RequestBoxContext context = listener.getRequestContext(); @@ -152,7 +151,6 @@ private void createClientCache( IStruct settings ) { .map( ( String setting ) -> setting.trim().isEmpty() ? CLIENT_STORAGE_MEMORY : setting.trim() ) // Return the right value or the default name .getOrDefault( CLIENT_STORAGE_MEMORY ); - // @formatter:on // Now we can get the right cache name to use Key clientCacheName = clientStorageName.equals( CLIENT_STORAGE_MEMORY ) diff --git a/src/test/java/ortus/boxlang/modules/compat/ClientScopeTest.java b/src/test/java/ortus/boxlang/modules/compat/ClientScopeTest.java index 6ccdfb6..8c5abb4 100644 --- a/src/test/java/ortus/boxlang/modules/compat/ClientScopeTest.java +++ b/src/test/java/ortus/boxlang/modules/compat/ClientScopeTest.java @@ -58,7 +58,7 @@ public void testGetClientVariablesList() { // @formatter:off runtime.executeSource( """ - application name="myApp-with-client-scope-on" clientManagement="true"; + application name="myApp-with-client-scope-variables" clientManagement="true"; client.foo = "bar"; result = getClientVariablesList();