avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Zeyliger (JIRA)" <j...@apache.org>
Subject [jira] Created: (AVRO-298) Dynamic and Specific APIs could be generified for better type safety
Date Sat, 09 Jan 2010 00:50:54 GMT
Dynamic and Specific APIs could be generified for better type safety
--------------------------------------------------------------------

                 Key: AVRO-298
                 URL: https://issues.apache.org/jira/browse/AVRO-298
             Project: Avro
          Issue Type: Improvement
          Components: java
            Reporter: Philip Zeyliger
            Assignee: Philip Zeyliger


Jon Hsieh pointed out that ReflectDatumWriter always returned a DatumWriter<Object>,
though it's often clear (by the way the schema is constructed) that there's a more specific
type that could be used.  In the quote below, the second line would be preferable to the third.

{noformat}
  Schema schema = reflectData.getSchema(MyObject.class);
  // DatumWriter<MyObject> writer = new ReflectDatumWriter(schema);
  DatumWriter<Object> writer = new ReflectDatumWriter(schema);
{noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message