Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-118

String type coercion should not be converying null to "null"

XMLWordPrintable

      The compiler generated type coercion for Strings is converting null to "null". This is wrong because it means that code expecting to be passed a null value will actually see a non-null String if it is passed via a binding or using a literal null. If the input value is null then the conversion should leave it as null

      Fixing this also requires fixing the String + operator compile method because it has been profiting from this implicit conversion to avoid having to check its operands. It should now test if its second operand is null and if so replace it with the String "null" before calling String.concat.

            rhn-engineering-adinn Andrew Dinn
            rhn-engineering-adinn Andrew Dinn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: