Skip to content
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

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

elpete
Copy link
Contributor

@elpete elpete commented Feb 28, 2024

This PR tries to achieve better CFML interop in two ways.

  1. Clearer naming showing when methods return Java collections instead of native CFML collections such as getNativeArray and collectToMap.
  2. Additional methods such as collectToArray to return CFML collections natively.

The one potential breaking change was that I changed collectToStruct to return a native CFML struct instead of a HashMap. This shouldn't actually break anything since you can call all of the HashMap methods on a CFML struct anyway, just not the other way around.

@elpete elpete requested review from lmajano and jclausen February 28, 2024 04:21
@elpete elpete self-assigned this Feb 28, 2024
Copy link

github-actions bot commented Feb 28, 2024

lucee@5 ColdBox be Test Results

46 tests   46 ✅  0s ⏱️
 3 suites   0 💤
 1 files     0 ❌

Results for commit e4ae0b7.

♻️ This comment has been updated with latest results.

Copy link

lucee@5 ColdBox ^6.0.0 Test Results

46 tests   46 ✅  0s ⏱️
 3 suites   0 💤
 1 files     0 ❌

Results for commit 315c292.

Copy link

github-actions bot commented Feb 28, 2024

lucee@5 ColdBox ^6.0.0 Test Results

46 tests   46 ✅  0s ⏱️
 3 suites   0 💤
 1 files     0 ❌

Results for commit e4ae0b7.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Feb 28, 2024

adobe@2018 ColdBox ^6.0.0 Test Results

45 tests   45 ✅  0s ⏱️
 3 suites   0 💤
 1 files     0 ❌

Results for commit e4ae0b7.

♻️ This comment has been updated with latest results.

Copy link

adobe@2023 ColdBox ^6.0.0 Test Results

45 tests   44 ✅  0s ⏱️
 3 suites   0 💤
 1 files     1 ❌

For more details on these failures, see this check.

Results for commit 315c292.

Copy link

github-actions bot commented Feb 28, 2024

adobe@2018 ColdBox be Test Results

45 tests   45 ✅  0s ⏱️
 3 suites   0 💤
 1 files     0 ❌

Results for commit e4ae0b7.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Feb 28, 2024

adobe@2023 ColdBox ^6.0.0 Test Results

45 tests   45 ✅  0s ⏱️
 3 suites   0 💤
 1 files     0 ❌

Results for commit e4ae0b7.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Feb 28, 2024

adobe@2021 ColdBox ^6.0.0 Test Results

45 tests   45 ✅  0s ⏱️
 3 suites   0 💤
 1 files     0 ❌

Results for commit e4ae0b7.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Feb 28, 2024

adobe@2021 ColdBox be Test Results

45 tests   45 ✅  0s ⏱️
 3 suites   0 💤
 1 files     0 ❌

Results for commit e4ae0b7.

♻️ This comment has been updated with latest results.

@elpete elpete force-pushed the better_cfml_interop branch from 315c292 to e4ae0b7 Compare February 28, 2024 04:26
*
*/
function collectAsArray(){
return arraySlice( variables.jStream.collect( variables.Collectors.toList() ), 1 );
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@lmajano lmajano merged commit 3e5f374 into development Feb 29, 2024
24 checks passed
@lmajano lmajano deleted the better_cfml_interop branch February 29, 2024 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants