Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-1463

Undefined values cause warnings when unions with null serialized

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Minor
    • Resolution: Unresolved
    • None
    • 1.9.0
    • perl
    • None
    • Perl: fix union serialization warnings when data is undef
    • perl

    Description

      This code produces warnings:

      $enc = '';
      $schema = Avro::Schema->parse(q(["long","null"]));
      Avro::BinaryEncoder->encode(
          schema => $schema,
          data => undef,
          emit_cb => sub { $enc .= ${ $_[0] } },
      );
      
      Use of uninitialized value $data in pack at /home/johnkarp/git/avro/lang/perl/blib/lib/Avro/Schema.pm line 285.
      Use of uninitialized value $data in string eq at /home/johnkarp/git/avro/lang/perl/blib/lib/Avro/Schema.pm line 287.
      

      Attachments

        1. AVRO-1463.patch
          6 kB
          John Karp

        Activity

          People

            jkarp John Karp
            jkarp John Karp
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: