src/main/java/org/embulk/input/marketo/delegate/ActivityBulkExtractInputPlugin.java in embulk-input-marketo-0.5.7.alpha.5 vs src/main/java/org/embulk/input/marketo/delegate/ActivityBulkExtractInputPlugin.java in embulk-input-marketo-0.5.7.alpha.6

- old
+ new

@@ -36,10 +36,10 @@ protected InputStream getExtractedStream(PluginTask task, Schema schema) { try (MarketoRestClient marketoRestClient = createMarketoRestClient(task)) { MarketoService marketoService = new MarketoServiceImpl(marketoRestClient); Date fromDate = task.getFromDate(); - return new FileInputStream(marketoService.extractAllActivity(fromDate, task.getToDate().get(), task.getPollingIntervalSecond(), task.getBulkJobTimeoutSecond())); + return new FileInputStream(marketoService.extractAllActivity(fromDate, task.getToDate().orNull(), task.getPollingIntervalSecond(), task.getBulkJobTimeoutSecond())); } catch (FileNotFoundException e) { LOGGER.error("Exception when trying to extract activity", e); throw new DataException("Error when trying to extract activity"); }