From 929b981710c6845685701c7df6f1a1a9cf92c429 Mon Sep 17 00:00:00 2001 From: Charles Allen Date: Thu, 5 Nov 2015 18:09:47 -0800 Subject: [PATCH] Change DefaultObjectMapper to NOT overwrite final fields unless explicitly asked to --- .../io/druid/firehose/rabbitmq/RabbitMQFirehoseFactory.java | 2 +- .../src/main/java/io/druid/indexer/HadoopTuningConfig.java | 2 +- .../src/main/java/io/druid/indexing/common/task/MoveTask.java | 2 +- .../src/main/java/io/druid/jackson/DefaultObjectMapper.java | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/extensions/rabbitmq/src/main/java/io/druid/firehose/rabbitmq/RabbitMQFirehoseFactory.java b/extensions/rabbitmq/src/main/java/io/druid/firehose/rabbitmq/RabbitMQFirehoseFactory.java index 2c715700003..2cefd8bd3ca 100644 --- a/extensions/rabbitmq/src/main/java/io/druid/firehose/rabbitmq/RabbitMQFirehoseFactory.java +++ b/extensions/rabbitmq/src/main/java/io/druid/firehose/rabbitmq/RabbitMQFirehoseFactory.java @@ -123,7 +123,7 @@ public class RabbitMQFirehoseFactory implements FirehoseFactory getTargetLoadSpec() { return targetLoadSpec; diff --git a/processing/src/main/java/io/druid/jackson/DefaultObjectMapper.java b/processing/src/main/java/io/druid/jackson/DefaultObjectMapper.java index b1d298d5cb0..d1fc68ae30c 100644 --- a/processing/src/main/java/io/druid/jackson/DefaultObjectMapper.java +++ b/processing/src/main/java/io/druid/jackson/DefaultObjectMapper.java @@ -53,6 +53,7 @@ public class DefaultObjectMapper extends ObjectMapper configure(MapperFeature.AUTO_DETECT_FIELDS, false); configure(MapperFeature.AUTO_DETECT_IS_GETTERS, false); configure(MapperFeature.AUTO_DETECT_SETTERS, false); + configure(MapperFeature.ALLOW_FINAL_FIELDS_AS_MUTATORS, false); configure(SerializationFeature.INDENT_OUTPUT, false); }