basic-lib/src/main/java/com/streamsets/pipeline/stage/processor/schemagen/generators/AvroSchemaGenerator.java
private JsonNode getDefaultValue(Schema schema) {
    if(getConfig().avroNullableFields && getConfig().avroDefaultNullable) {
      return NullNode.getInstance();
    }

    if(!getConfig().avroNullableFields && defaultValuesForTypes.containsKey(schema.getType())) {
      return defaultValuesForTypes.get(schema.getType());
    }

    return null;
  }
private JsonNode getDefaultValue(Schema schema) {
    if(getConfig().avroNullableFields && getConfig().avroDefaultNullable) {
      return NullNode.getInstance();
    }

    if(!getConfig().avroNullableFields && defaultValuesForTypes.containsKey(schema.getType())) {
      return defaultValuesForTypes.get(schema.getType());
    }

    return null;
  }
private JsonNode getDefaultValue ( Schema schema ) { if ( getConfig ( ) . avroNullableFields && getConfig ( ) . avroDefaultNullable ) { return NullNode . getInstance ( ) ; } if ( ! getConfig ( ) . avroNullableFields && defaultValuesForTypes . containsKey ( schema . getType ( ) ) ) { return defaultValuesForTypes . get ( schema . getType ( ) ) ; } return null ; }
Returns default value for given field or null if no default value should be used.
Returns default value for given field or null if no default value should be used .