github-code-scanning[bot] commented on code in PR #2053:
URL: https://github.com/apache/avro/pull/2053#discussion_r1066895474


##########
lang/java/avro/src/test/java/org/apache/avro/SchemaNameValidatorTest.java:
##########
@@ -0,0 +1,42 @@
+package org.apache.avro;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+import java.util.stream.Stream;
+
+class SchemaNameValidatorTest {

Review Comment:
   ## Unused classes and interfaces
   
   Unused class: SchemaNameValidatorTest is not referenced within this 
codebase. If not used as an external API it should be removed.
   
   [Show more 
details](https://github.com/apache/avro/security/code-scanning/2964)



##########
lang/java/avro/src/main/java/org/apache/avro/Schema.java:
##########
@@ -1724,7 +1712,7 @@
           if (defaultValue != null
               && (Type.FLOAT.equals(fieldSchema.getType()) || 
Type.DOUBLE.equals(fieldSchema.getType()))
               && defaultValue.isTextual())
-            defaultValue = new 
DoubleNode(Double.valueOf(defaultValue.textValue()));
+            defaultValue = new 
DoubleNode(Double.parseDouble(defaultValue.textValue()));

Review Comment:
   ## Missing catch of NumberFormatException
   
   Potential uncaught 'java.lang.NumberFormatException'.
   
   [Show more 
details](https://github.com/apache/avro/security/code-scanning/2965)



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