Skip to content

Commit 48a74de

Browse files
committed
Avro2JsonSchemaProcessor: add a comment about AvroRuntimeException
1 parent 0bf28a9 commit 48a74de

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main/java/com/github/fge/avro/Avro2JsonSchemaProcessor.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ public SchemaHolder process(final ProcessingReport report,
2727
final String s = node.toString();
2828
avroSchema = new Schema.Parser().parse(s);
2929
} catch (AvroRuntimeException e) {
30+
/*
31+
* There is a SchemaParseException, but it does not cover all cases.
32+
*
33+
* This schema, for instance, throws a AvroRuntimeException:
34+
*
35+
* { "type": [ "null", "null" ] }
36+
*
37+
*/
3038
throw new IllegalAvroSchemaException(e);
3139
}
3240

0 commit comments

Comments
 (0)