mirror of https://github.com/apache/nifi.git
Preferring the constant empty string for clarity instead of quotes.
This commit is contained in:
parent
a058fd0460
commit
408f636361
|
@ -35,6 +35,7 @@ import org.apache.nifi.processor.io.OutputStreamCallback;
|
||||||
import org.apache.nifi.processors.standard.util.JsonUtils;
|
import org.apache.nifi.processors.standard.util.JsonUtils;
|
||||||
import org.apache.nifi.stream.io.BufferedOutputStream;
|
import org.apache.nifi.stream.io.BufferedOutputStream;
|
||||||
import org.apache.nifi.util.ObjectHolder;
|
import org.apache.nifi.util.ObjectHolder;
|
||||||
|
import org.apache.nifi.util.StringUtils;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
@ -206,7 +207,7 @@ public class EvaluateJsonPath extends AbstractProcessor {
|
||||||
} catch (PathNotFoundException e) {
|
} catch (PathNotFoundException e) {
|
||||||
logger.warn("FlowFile {} could not find path {} for attribute key {}.", new Object[]{flowFile.getId(), jsonPathExp.getPath(), jsonPathAttrKey}, e);
|
logger.warn("FlowFile {} could not find path {} for attribute key {}.", new Object[]{flowFile.getId(), jsonPathExp.getPath(), jsonPathAttrKey}, e);
|
||||||
if (destination.equals(DESTINATION_ATTRIBUTE)) {
|
if (destination.equals(DESTINATION_ATTRIBUTE)) {
|
||||||
jsonPathResults.put(jsonPathAttrKey, "");
|
jsonPathResults.put(jsonPathAttrKey, StringUtils.EMPTY);
|
||||||
continue jsonPathEvalLoop;
|
continue jsonPathEvalLoop;
|
||||||
} else {
|
} else {
|
||||||
processSession.transfer(flowFile, REL_NO_MATCH);
|
processSession.transfer(flowFile, REL_NO_MATCH);
|
||||||
|
|
Loading…
Reference in New Issue