---
fix up
This commit is contained in:
aalehin 2023-05-30 18:08:29 +03:00
parent 5c3c287bf4
commit f99398ea12
2 changed files with 4 additions and 6 deletions

View file

@ -45,7 +45,7 @@ public class ImportToDB extends Stage {
Charset sourceCharset = Charset.forName(settings.getCommon().getEncodingSource()); Charset sourceCharset = Charset.forName(settings.getCommon().getEncodingSource());
try (InputStream is = new ByteArrayInputStream(source); try (InputStream is = new ByteArrayInputStream(source);
SWTReader swtReader = new SWTReader(is, sourceCharset, resultContainer)) { SWTReader swtReader = new SWTReader(is, sourceCharset, resultContainer)) {
AbstractTable table = mappingEnumTableObjectTable.get(currTable); AbstractTable table = mappingEnumTableObjectTable.get(currTable);
table.setHazelcastService(hazelcastService); table.setHazelcastService(hazelcastService);
table.setFilename(resultContainer.getSwtFile().getName()); table.setFilename(resultContainer.getSwtFile().getName());
@ -60,9 +60,7 @@ public class ImportToDB extends Stage {
log.warn("record index {} null", counter); log.warn("record index {} null", counter);
continue; continue;
} }
if (entity.length > 0) { table.injectEntity(table.getEntity(swtHeaderData, entity));
table.injectEntity(table.getEntity(swtHeaderData, entity));
}
} }
kafkaMessenger.notifySystemIfNeeded(currTable, fileId); kafkaMessenger.notifySystemIfNeeded(currTable, fileId);
} catch (IOException exception) { } catch (IOException exception) {

View file

@ -108,12 +108,12 @@ S_DF_13
String line = scanner.nextLine(); String line = scanner.nextLine();
String[] separetedLine = line.split(":"); String[] separetedLine = line.split(":");
if (separetedLine.length < 5) { if (separetedLine.length < 5) {
return new String[0]; return null;
} }
return separetedLine; return separetedLine;
case S_DF_13: case S_DF_13:
default: default:
return new String[0]; return null;
} }
} }