When testing tacokit component using beam there is an NPE in this code:
package org.talend.sdk.component.runtime.beam.spi.record;
public class SchemaIdGenerator {
...
private static long fingerprint(final List<Schema.Field> fields) {
return SchemaNormalization
.parsingFingerprint64(Schema
.createRecord(fields
.stream()
...
'fields' is a Null
-------------------------------
I call this using next code:
Schema res = recordBuilderFactory.newSchemaBuilder(Schema.Type.RECORD)
.withEntry(recordBuilderFactory.newEntryBuilder().withName("createdBy").withType(Schema.Type.RECORD).build())
-------------------------------
and the stack trace:
fingerprint:38, SchemaIdGenerator (org.talend.sdk.component.runtime.beam.spi.record)
generateRecordName:32, SchemaIdGenerator (org.talend.sdk.component.runtime.beam.spi.record)
build:132, AvroSchemaBuilder (org.talend.sdk.component.runtime.beam.spi.record)
withEntry:92, AvroSchemaBuilder (org.talend.sdk.component.runtime.beam.spi.record)
guessTableSchemaList:103, OneDriveService (org.talend.components.onedrive.service)
schemaDiscoveryListTest:32, OneDriveServiceTest (org.talend.components.onedrive)
---------------------------------
<component-api.version>1.1.1</component-api.version>
<component-runtime.version>1.1.3-SNAPSHOT</component-runtime.version>
<beam.version>2.6.0</beam.version>
- is cloned by
-
TCOMP-1205 Empty JSon object lead to NPE
- Done