Change DefaultObjectMapper to NOT overwrite final fields unless explicitly asked to

This commit is contained in:
Charles Allen 2015-11-05 18:09:47 -08:00
parent 379ca87e6a
commit 929b981710
4 changed files with 4 additions and 3 deletions

View File

@ -123,7 +123,7 @@ public class RabbitMQFirehoseFactory implements FirehoseFactory<StringInputRowPa
return config; return config;
} }
@JsonProperty @JsonProperty("connection")
public JacksonifiedConnectionFactory getConnectionFactory() public JacksonifiedConnectionFactory getConnectionFactory()
{ {
return connectionFactory; return connectionFactory;

View File

@ -138,7 +138,7 @@ public class HadoopTuningConfig implements TuningConfig
return indexSpec; return indexSpec;
} }
@JsonProperty @JsonProperty("maxRowsInMemory")
public int getRowFlushBoundary() public int getRowFlushBoundary()
{ {
return rowFlushBoundary; return rowFlushBoundary;

View File

@ -106,7 +106,7 @@ public class MoveTask extends AbstractFixedIntervalTask
return TaskStatus.success(getId()); return TaskStatus.success(getId());
} }
@JsonProperty @JsonProperty("target")
public Map<String, Object> getTargetLoadSpec() public Map<String, Object> getTargetLoadSpec()
{ {
return targetLoadSpec; return targetLoadSpec;

View File

@ -53,6 +53,7 @@ public class DefaultObjectMapper extends ObjectMapper
configure(MapperFeature.AUTO_DETECT_FIELDS, false); configure(MapperFeature.AUTO_DETECT_FIELDS, false);
configure(MapperFeature.AUTO_DETECT_IS_GETTERS, false); configure(MapperFeature.AUTO_DETECT_IS_GETTERS, false);
configure(MapperFeature.AUTO_DETECT_SETTERS, false); configure(MapperFeature.AUTO_DETECT_SETTERS, false);
configure(MapperFeature.ALLOW_FINAL_FIELDS_AS_MUTATORS, false);
configure(SerializationFeature.INDENT_OUTPUT, false); configure(SerializationFeature.INDENT_OUTPUT, false);
} }