-
Notifications
You must be signed in to change notification settings - Fork 117
Work around for Cannot invoke "java.lang.Class.isPrimitive()" #448
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
Conversation
✅ Deploy Preview for taffy-docs canceled.
|
atuttle
left a comment
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.
Thanks for the PR! A couple of details to sort out...
core/api.cfc
Outdated
| <!--- Check for method tunnelling by clients unable to send PUT/DELETE requests (e.g. Flash Player); | ||
| Actual desired method will be contained in a special header ---> | ||
| <cfset var httpMethodOverride = GetPageContext().getRequest().getHeader("X-HTTP-Method-Override") /> | ||
| <cfset var httpMethodOverride = nullValue()/> |
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.
nullValue isn't available on ACF, especially not as far back as ACF8 which we still technically support. Could it be polyfilled?
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.
ACF8 must be waaaaay out of Adobe support by now ( unofficial list https://www.lansweeper.com/blog/eol/adobe-coldfusion-end-of-life/ has it exiting support ten years ago). Surely any one stuck on it isn't going to worry that a future Taffy drops support ?
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.
Well to be fair, even the latest ACF doesn't have nullvalue(), does it? (I wouldn't know, I stopped using ACF years ago...) what about switching to javaCast('null',0); instead?
core/api.cfc
Outdated
| <cfset var httpMethodOverride = nullValue()/> | ||
| <cftry> | ||
| <cfset httpMethodOverride = GetPageContext().getRequest().getHeader("X-HTTP-Method-Override") /> | ||
| <cfcatch type="any"></cfcatch> | ||
| </cftry> |
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.
Also looks like you've duplicated the added lines, unless I'm missing something?
|
I've fixed the duplicated code, and just "null" should be supported in both ACF and Lucee ( https://coldfusion.adobe.com/2018/07/null-support-in-coldfusion-2018/ | https://docs.lucee.org/recipes/null-support.html ) |
|
Bah, for that matter, we can just use the string "null" and check for that instead of |
|
Merged, thanks again for the PR! |
Fixes #447