Key instance not being coerced to string

Description

Consider this code:

application.appName = "someString";

someSettings = { protocol : application.appName.startsWith( "inLeagueTestingSuite") ? { class : "tests.resources.TestDbLoggingMailProtocol", properties : {} } : { class : "cbmailservices.models.protocols.CFMailProtocol", properties : {} } };

This throws: No such method [startsWith] found in the class [ortus.boxlang.runtime.scopes.Key] using [1] arguments of types [[class java.lang.String]]

There are of course some easy workarounds but this works in Lucee 5.4.

Activity

Brad WoodMarch 6, 2025 at 1:39 AM

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Sentry

Created March 5, 2025 at 9:29 PM
Updated March 6, 2025 at 1:39 AM
Resolved March 6, 2025 at 1:39 AM

Flag notifications