Github user apiri commented on a diff in the pull request:
https://github.com/apache/nifi-minifi/pull/15#discussion_r60846573
--- Diff:
minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/configuration/notifiers/FileChangeNotifier.java
---
@@ -63,15 +71,23 @@
}
@Override
- public void notifyListeners() {
+ public ListenerHandleResult[] notifyListeners() {
+ logger.info("Notifying Listeners of a change");
final File fileToRead = configFile.toFile();
+
+ ListenerHandleResult[] listenerHandleResults = new
ListenerHandleResult[configurationChangeListeners.size()];
+ int count = 0;
for (final ConfigurationChangeListener listener :
getChangeListeners()) {
try (final FileInputStream fis = new
FileInputStream(fileToRead);) {
listener.handleChange(fis);
- } catch (IOException ex) {
- throw new IllegalStateException("Unable to read the
changed file " + configFile, ex);
+ listenerHandleResults[count] = new
ListenerHandleResult(listener);
+ } catch (IOException | ConfigurationChangeException ex) {
+ listenerHandleResults[count] = new
ListenerHandleResult(listener, ex);
}
+ logger.info("Listener notification result:" +
listenerHandleResults[count].toString());
+ count ++;
}
+ return new ListenerHandleResult[0];
--- End diff --
this should be listenerHandleResults. this is only returning a new empty
array.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---