tracker issue : CF-4202198

select a category, or use search below
(searches all categories and all time range)
Title:

[ANeff] Bug for: array dump header should display (unsynchronized) and ({dataType})

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Aaron Neff / ()

Created: 04/29/2018

Components: Debugging, writeDump

Versions: 2018

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2018.0.01.308605 (PreRelease) / 2018,0,0,308863

Priority/Frequency: Normal / Very few users will encounter

Locale/System: / Platforms All

Vote Count: 0

Issue: ordered struct dump header displays (ordered), good, but unsynchronized array dump header doesn't display (unsynchronized) and typed array header doesn't display ({dataType})

Repro (using writeDump() as the example, but fix should also apply to cfdump):

{code:java}
<cfscript>
  myStruct = [:]
  writeDump(myStruct)
  //Actual and Expected Result: dump header is "struct (ordered) [empty]" good
  
  myUnsynchronizedArray = arrayNew(1,false)
  writeDump(myUnsynchronizedArray)
  //Actual Result: dump header is "array [empty]"
  //Expected Result: dump header is "array (unsynchronized)"
  
  myStringArray = ["string"][]
  writeDump(myStringArray)
  //Actual Result: dump header is "array [empty]"
  //Expected Result: dump header is "array (string)"
  
  myUnsynchronizedStringArray = arrayNew(1,false,"string")//Currently throws exception. Will work when dataType parameter is added to arrayNew() per Named Arguments ArgumentCollection support
  writeDump(myUnsynchronizedStringArray)
  //Expected Result: dump header is "array (unsynchronized) (string)"
  //Note: It should be "(unsynchronized) (string)", not "(string) (unsynchronized)" b/c type should come before dataType
</cfscript>
{code}

Attachments:

Comments:

Array dump will now include the type of the array (if specified in declaration). Unsynchronized / Synchronized information will not be displayed.
Comment by Immanuel N.
27646 | May 02, 2018 01:03:22 PM GMT
Hi Immanuel, - For struct, the 'type' is unordered (default) or ordered. - For array, the 'type' is synchronized (default) or unsynchronized. Knowing 'type' is useful debugging info. Why not show the useful info? Hiding the 'type' of an array is useful to the developer? How? Thanks!, -Aaron
Comment by Aaron N.
27674 | May 05, 2018 01:03:56 AM GMT
Adobe can you please reconsider?? I don't know why we even have to debate that debugging info should show both bits of useful info. It's not like this is something that affects language-wide behavior. It's just a helpful visual tweak. It just makes developers lives a little simpler if they can see, from debugging output, if an array is the type and dataType that they anticipated.
Comment by Aaron N.
27675 | May 05, 2018 01:15:09 AM GMT
Hi Adobe, Why can't 'type' & 'dataType' info be shown in array dump? Why only 'dataType'? It's just -debugging- info. If I'm dumping out an array, and it's unsynchronized, then I'd like know that when looking at the dump. Thanks!, -Aaron
Comment by Aaron N.
27782 | May 13, 2018 08:03:09 AM GMT