You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Jian Jiang (JIRA)" <ji...@apache.org> on 2014/06/23 22:20:24 UTC

[jira] [Created] (AVRO-1531) Assignment missing in AvroDatumConverterFactory

Jian Jiang created AVRO-1531:
--------------------------------

             Summary: Assignment missing in AvroDatumConverterFactory
                 Key: AVRO-1531
                 URL: https://issues.apache.org/jira/browse/AVRO-1531
             Project: Avro
          Issue Type: Bug
          Components: java
    Affects Versions: 1.7.6, 1.7.5
            Reporter: Jian Jiang


The following defect found in method: public <IN, OUT> AvroDatumConverter<IN, OUT> create(Class<IN> inputClass):

    if (AvroValue.class.isAssignableFrom(inputClass)) {
      Schema schema = null;
      if (isMapOnly) {
        AvroJob.getMapOutputValueSchema(getConf());<---!!!Missing assignment to schema variable--->
        if (null == schema) {
          schema = AvroJob.getOutputValueSchema(getConf());
        }
      }
      else {
        schema = AvroJob.getOutputValueSchema(getConf());
      }
      if (null == schema) {
        throw new IllegalStateException(
            "Writer schema for output value was not set. Use AvroJob.setOutputValueSchema().");
      }
      return (AvroDatumConverter<IN, OUT>) new AvroWrapperConverter(schema);
    }



--
This message was sent by Atlassian JIRA
(v6.2#6252)