Github user joewitt commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1564#discussion_r104315918
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanAttribute.java
---
@@ -151,24 +182,41 @@ public void onScheduled(final ProcessContext context)
throws IOException {
this.dictionaryTerms = createDictionary(context);
this.fileWatcher = new
SynchronousFileWatcher(Paths.get(context.getProperty(DICTIONARY_FILE).getValue()),
new LastModifiedMonitor(), 1000L);
+
+ this.dictionaryEntryMetadataDemarcator =
context.getProperty(DICTIONARY_ENTRY_METADATA_DEMARCATOR).getValue();
}
- private Set<String> createDictionary(final ProcessContext context)
throws IOException {
- final Set<String> terms = new HashSet<>();
+ private Map<String,String> createDictionary(final ProcessContext
context) throws IOException {
+ final Map<String,String> termsMeta = new HashMap<String, String>();
+ this.dictionaryEntryMetadataDemarcator =
context.getProperty(DICTIONARY_ENTRY_METADATA_DEMARCATOR).getValue();
+
+ String[] termMeta;
--- End diff --
Consider moving this to the innermost scope possible. It could be 'final
String[] termMeta' declared and initialized fully on line 209 since it is only
used by 210 and 211.
---
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.
---