teragrep / pth_06

Teragrep Datasource for Apache Spark
GNU Affero General Public License v3.0
0 stars 5 forks source link

Null pointer dereferences in KafkaRecordConverter.java: 135 #51

Open StrongestNumber9 opened 2 months ago

StrongestNumber9 commented 2 months ago

Describe the bug

 *** CID 1594361:  Null pointer dereferences  (NULL_RETURNS)
/src/main/java/com/teragrep/pth_06/task/kafka/KafkaRecordConverter.java: 135 in com.teragrep.pth_06.task.kafka.KafkaRecordConverter.convert(java.io.InputStream, java.lang.String, long)()
129                 rfc5424Frame.next();
130             }
131             catch (IOException ioException) {
132                 throw new UncheckedIOException(ioException);
133             }
134     
>>>     CID 1594361:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "null" "(new com.teragrep.rlo_06.RFC5424Timestamp(rfc5424Frame.timestamp)).toZonedDateTime()" when calling "rfc3339ToEpoch".
135             final long epochMicros = rfc3339ToEpoch(new RFC5424Timestamp(rfc5424Frame.timestamp).toZonedDateTime());
136     
137             // input
138             final byte[] source = eventToSource();
139     
140             // origin

Software version

3.0.1