github-advanced-security[bot] commented on code in PR #3766:
URL: https://github.com/apache/avro/pull/3766#discussion_r3214867973


##########
lang/java/avro/src/test/java/org/apache/avro/TestLogicalType.java:
##########
@@ -190,15 +190,15 @@
   void fixedDecimalToFromJson() {
     Schema schema = Schema.createFixed("aDecimal", null, null, 4);
     LogicalTypes.decimal(9, 2).addToSchema(schema);
-    Schema parsed = new Schema.Parser().parse(schema.toString(true));
+    Schema parsed = SchemaParser.parseSingle(schema.toString(true));
     assertEquals(schema, parsed, "Constructed and parsed schemas should 
match");
   }
 
   @Test
   void bytesDecimalToFromJson() {
     Schema schema = Schema.create(Schema.Type.BYTES);
     LogicalTypes.decimal(9, 2).addToSchema(schema);
-    Schema parsed = new Schema.Parser().parse(schema.toString(true));
+    Schema parsed = SchemaParser.parseSingle(schema.toString(true));

Review Comment:
   ## CodeQL / Deprecated method or constructor invocation
   
   Invoking [Schema.toString](1) should be avoided because it has been 
deprecated.
   
   [Show more 
details](https://github.com/apache/avro/security/code-scanning/3363)



##########
lang/java/avro/src/test/java/org/apache/avro/TestLogicalType.java:
##########
@@ -190,15 +190,15 @@
   void fixedDecimalToFromJson() {
     Schema schema = Schema.createFixed("aDecimal", null, null, 4);
     LogicalTypes.decimal(9, 2).addToSchema(schema);
-    Schema parsed = new Schema.Parser().parse(schema.toString(true));
+    Schema parsed = SchemaParser.parseSingle(schema.toString(true));

Review Comment:
   ## CodeQL / Deprecated method or constructor invocation
   
   Invoking [Schema.toString](1) should be avoided because it has been 
deprecated.
   
   [Show more 
details](https://github.com/apache/avro/security/code-scanning/3362)



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to