You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
javascript_identifier_ has args.length = 1, while javascript_identifier_, has args.length = 0
javascript_identifier_,,somevalue has args.length = 3, while javascript_identifier_somevalue,, has args.length = 1
Expected behaviour would be that args.length = amount of commas + 1 in every case. It seems that it will only parse arguments until the last argument with a non empty string. Empty arguments should be arguments as well for consistency.
The text was updated successfully, but these errors were encountered:
The individual args ending up as null is not an issue here, it will not influence the length.
The actual cause is located here.
If you check the javadocs for String#split, you will see that without specifying a limit it will default to 0, which will drop any trailing empty Strings. The solution here is to use any negative integer as the limit.
javascript_identifier_
hasargs.length = 1
, whilejavascript_identifier_,
hasargs.length = 0
javascript_identifier_,,somevalue
hasargs.length = 3
, whilejavascript_identifier_somevalue,,
hasargs.length = 1
Expected behaviour would be that
args.length = amount of commas + 1
in every case. It seems that it will only parse arguments until the last argument with a non empty string. Empty arguments should be arguments as well for consistency.The text was updated successfully, but these errors were encountered: