@@ -709,7 +709,7 @@ private void fillField(
709709 protoMsg .setField (fieldDescriptor , value );
710710 }
711711 } else if (val instanceof Short || val instanceof Integer || val instanceof Long ) {
712- protoMsg .setField (fieldDescriptor , (( Long ) val ). toString ( ));
712+ protoMsg .setField (fieldDescriptor , String . valueOf ( val ));
713713 } else if (val instanceof Timestamp ) {
714714 Timestamp timestamp = (Timestamp ) val ;
715715 protoMsg .setField (
@@ -1001,7 +1001,7 @@ private void fillRepeatedField(
10011001 protoMsg .addRepeatedField (fieldDescriptor , value );
10021002 }
10031003 } else if (val instanceof Short || val instanceof Integer || val instanceof Long ) {
1004- protoMsg .setField (fieldDescriptor , (( Long ) val ). toString ( ));
1004+ protoMsg .setField (fieldDescriptor , String . valueOf ( val ));
10051005 } else if (val instanceof Timestamp ) {
10061006 Timestamp timestamp = (Timestamp ) val ;
10071007 protoMsg .addRepeatedField (
@@ -1101,17 +1101,4 @@ static boolean isValidTimestamp(String timestamp) {
11011101 }
11021102 return true ;
11031103 }
1104-
1105- /**
1106- * Converts microseconds from epoch to a Java Instant.
1107- *
1108- * @param microsFromEpoc the number of microseconds from 1970-01-01T00:00:00Z
1109- * @return the Instant corresponding to the microseconds
1110- */
1111- private static Instant fromEpochMicros (long microsFromEpoc ) {
1112- long seconds = Math .floorDiv (microsFromEpoc , MICROS_PER_SECOND );
1113- int nanos = (int ) Math .floorMod (microsFromEpoc , MICROS_PER_SECOND ) * NANOS_PER_MICRO ;
1114-
1115- return Instant .ofEpochSecond (seconds , nanos );
1116- }
11171104}
0 commit comments