From e5ae42e5703b8b193e5c2a61458e28a931c5774e Mon Sep 17 00:00:00 2001 From: Doug Cutting Date: Thu, 22 Jun 2017 09:54:44 -0700 Subject: [PATCH] AVRO-2035: Java: validate default values when parsing schemas. --- CHANGES.txt | 2 ++ lang/java/avro/src/main/java/org/apache/avro/Schema.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index d7b0ec1171f..f20b21d6463 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,8 @@ Trunk (not yet released) INCOMPATIBLE CHANGES + AVRO-2035: Java: validate default values when parsing schemas. (cutting) + NEW FEATURES AVRO-1704: Java: Add support for single-message encoding. (blue) diff --git a/lang/java/avro/src/main/java/org/apache/avro/Schema.java b/lang/java/avro/src/main/java/org/apache/avro/Schema.java index 53e5e2ea20d..c36ed97b42a 100644 --- a/lang/java/avro/src/main/java/org/apache/avro/Schema.java +++ b/lang/java/avro/src/main/java/org/apache/avro/Schema.java @@ -958,7 +958,7 @@ private static class NullSchema extends Schema { public static class Parser { private Names names = new Names(); private boolean validate = true; - private boolean validateDefaults = false; + private boolean validateDefaults = true; /** Adds the provided types to the set of defined, named types known to * this parser. */