abhilashmandaliya commented on a change in pull request #10482:
URL: https://github.com/apache/pulsar/pull/10482#discussion_r626389570
##########
File path:
pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/JSONSchemaTest.java
##########
@@ -380,16 +382,15 @@ public void testEncodeAndDecodeObject() throws
JsonProcessingException {
}
@Test
- public void testGetNativeSchema() throws SchemaValidationException {
+ public void testGetNativeSchema() throws IllegalAccessException {
JSONSchema<PC> schema2 = JSONSchema.of(PC.class);
- org.apache.avro.Schema avroSchema2 = (Schema)
schema2.getNativeSchema().get();
+ org.apache.avro.Schema avroSchema2 =
+ (Schema)
schema2.getNativeSchema().orElseThrow(IllegalAccessException::new);
Review comment:
it was unsafe to call get on optional without checking it. hence I added
this exception there
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]