-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add better naming and CFML interop with CFML Arrays and Structs #8
Conversation
lucee@5 ColdBox be Test Results46 tests 46 ✅ 0s ⏱️ Results for commit e4ae0b7. ♻️ This comment has been updated with latest results. |
lucee@5 ColdBox ^6.0.0 Test Results46 tests 46 ✅ 0s ⏱️ Results for commit 315c292. |
lucee@5 ColdBox ^6.0.0 Test Results46 tests 46 ✅ 0s ⏱️ Results for commit e4ae0b7. ♻️ This comment has been updated with latest results. |
adobe@2018 ColdBox ^6.0.0 Test Results45 tests 45 ✅ 0s ⏱️ Results for commit e4ae0b7. ♻️ This comment has been updated with latest results. |
adobe@2023 ColdBox ^6.0.0 Test Results45 tests 44 ✅ 0s ⏱️ For more details on these failures, see this check. Results for commit 315c292. |
adobe@2018 ColdBox be Test Results45 tests 45 ✅ 0s ⏱️ Results for commit e4ae0b7. ♻️ This comment has been updated with latest results. |
adobe@2023 ColdBox ^6.0.0 Test Results45 tests 45 ✅ 0s ⏱️ Results for commit e4ae0b7. ♻️ This comment has been updated with latest results. |
adobe@2021 ColdBox ^6.0.0 Test Results45 tests 45 ✅ 0s ⏱️ Results for commit e4ae0b7. ♻️ This comment has been updated with latest results. |
adobe@2021 ColdBox be Test Results45 tests 45 ✅ 0s ⏱️ Results for commit e4ae0b7. ♻️ This comment has been updated with latest results. |
315c292
to
e4ae0b7
Compare
* | ||
*/ | ||
function collectAsArray(){ | ||
return arraySlice( variables.jStream.collect( variables.Collectors.toList() ), 1 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure with 1 it works in Java arrays? and not 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it does. It is mostly used to convert the Java array to a CFML array.
This PR tries to achieve better CFML interop in two ways.
getNativeArray
andcollectToMap
.collectToArray
to return CFML collections natively.The one potential breaking change was that I changed
collectToStruct
to return a native CFML struct instead of aHashMap
. This shouldn't actually break anything since you can call all of theHashMap
methods on a CFML struct anyway, just not the other way around.