mirror of https://github.com/apache/nifi.git
NIFI-261: Sort processor properties before fingerprinting for templates
This commit is contained in:
parent
67dee2e33b
commit
210a21cd8f
|
@ -29,6 +29,8 @@ import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.SortedMap;
|
||||||
|
import java.util.TreeMap;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import javax.xml.XMLConstants;
|
import javax.xml.XMLConstants;
|
||||||
|
@ -57,7 +59,6 @@ import org.apache.nifi.web.api.dto.RemoteProcessGroupContentsDTO;
|
||||||
import org.apache.nifi.web.api.dto.RemoteProcessGroupDTO;
|
import org.apache.nifi.web.api.dto.RemoteProcessGroupDTO;
|
||||||
import org.apache.nifi.web.api.dto.RemoteProcessGroupPortDTO;
|
import org.apache.nifi.web.api.dto.RemoteProcessGroupPortDTO;
|
||||||
import org.apache.nifi.web.api.dto.TemplateDTO;
|
import org.apache.nifi.web.api.dto.TemplateDTO;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -510,7 +511,8 @@ public final class FingerprintFactory {
|
||||||
if (config.getProperties() == null) {
|
if (config.getProperties() == null) {
|
||||||
builder.append("NO_PROPERTIES");
|
builder.append("NO_PROPERTIES");
|
||||||
} else {
|
} else {
|
||||||
for (final Map.Entry<String, String> entry : config.getProperties().entrySet()) {
|
final SortedMap<String, String> sortedProps = new TreeMap<>(config.getProperties());
|
||||||
|
for (final Map.Entry<String, String> entry : sortedProps.entrySet()) {
|
||||||
final String propName = entry.getKey();
|
final String propName = entry.getKey();
|
||||||
final String propValue = entry.getValue();
|
final String propValue = entry.getValue();
|
||||||
if (propValue == null) {
|
if (propValue == null) {
|
||||||
|
|
Loading…
Reference in New Issue