Skip to main content
Participant
August 22, 2021
Question

CF2021 Code analyzer false error

  • August 22, 2021
  • 1 reply
  • 175 views

Has anyone experienced a false error when running the analzer? 

It returned an error for CFOBJECT saying "ColdFusion 2021 has modified the usage of system function CreateObject. The value 'corba' for the parameter 'type' has been removed."

When I look at the file higlighted it doesn't use corba. We don't use this on the whole site.

When I use the CF file containing this code it actually works and doesn't error so that doesn't explain why the analyzer picked it up.

The second  error higlighted was with the CFDOCUMENT tag:

"ColdFusion 2021 has modified the usage of CFDocument tag. The usage of the attribute format="Flashpaper" has been retired."

Again, the file it highlighted doesn't use flashpaper, it uses PDF so I'm not sure why the analyzer considers this an error. Any ideas gratefully received. We're looking to upgrade to 2021 and want to be confident we've prepared for any code changes needed.

    This topic has been closed for replies.

    1 reply

    Charlie Arehart
    Community Expert
    Community Expert
    August 23, 2021

    Sam, I'll share an opinion first that the Code Compatibility Analyzer (in the CF Admin) will never be a fully satisfying experience, nor one you can rely on "to be confident we've prepared for any code changes needed."

     

    But it's all we have, so you have to make the best of things. As for whether it's reported ANY false positives, I can say I'm sure it has (in its life of more than 20 years) As for those specific ones, I can say I had not heard of anyone reporting them (but that doesn't mean they had not).

     

    Moving on to "what can you do about it", sadly all you can do is file a bug report (at tracker.adobe.com), unless some kind Adobe engineer somehow pops in here and offers to help. While the UI is fairly intuitive, it can throw some off. I can share that I did a blog post a couple of years ago with some more thoughts on using it (tracker.adobe.com). If you do file a ticket, please share it here so that anyone else interested in the problem may be able to add a vote or comment or just follow the ticket.

     

    Finally, as for how you might be more "confident" that you've prepared for any code changes needed", really there's no substitute for testing your code in a non-prod environment. But of course it's hard to do that well (for most people), and so they tend to just "do what they can to test" and then move the code to prod and "hope for the best". Sadly, for many if not most folks, that's it for their options.

     

    I wish I could offer more hope for you that the Code Compatibility Analyzer could serve you better. It's a tool that has not really been used as widely as it should--and it's a chicken and egg problem: is it not used because it's not been satisfying? Or has the fact that few use it kept Adobe from feeling pressure to improve it.

     

    Hope this has been of at least some help.

    /Charlie (troubleshooter, carehart. org)