From c272574dccba9fa212af2ba60853b88afebb6380 Mon Sep 17 00:00:00 2001 From: EndzeitBegins <16666115+EndzeitBegins@users.noreply.github.com> Date: Sat, 2 Dec 2023 00:49:44 +0100 Subject: [PATCH] NIFI-12452 Improved support for DescribedValue in Descriptors - Removed calls to Builder.defaultValue(null) in several Components This closes #8102 Signed-off-by: David Handermann --- .../nifi/components/PropertyDescriptor.java | 18 +++++++ .../apache/nifi/components/PropertyValue.java | 12 +++++ .../components/TestPropertyDescriptor.java | 11 ++++ .../language/StandardPropertyValue.java | 17 +++++++ .../apache/nifi/util/MockPropertyValue.java | 6 +++ .../util/StandardProcessorTestRunner.java | 3 +- .../java/org/apache/nifi/util/TestRunner.java | 3 +- .../azure/eventhub/PutAzureEventHub.java | 1 - .../mysql/processors/CaptureChangeMySQL.java | 1 - .../nifi/dbcp/utils/DBCPProperties.java | 5 -- .../FullyDocumentedControllerService.java | 4 +- .../scheduling/ConnectableProcessContext.java | 7 +++ .../processor/TestStandardPropertyValue.java | 50 +++++++++++++++++++ .../nifi/graph/TinkerpopClientService.java | 1 - .../nifi/dbcp/hive/Hive3ConnectionPool.java | 3 -- .../kudu/AbstractKuduProcessor.java | 1 - .../apache/nifi/snmp/processors/GetSNMP.java | 1 - .../livy/LivySessionController.java | 1 - .../nifi/processors/standard/ListenHTTP.java | 4 +- .../processors/standard/MergeContent.java | 1 - .../nifi/processors/standard/MergeRecord.java | 1 - .../processors/standard/ScanAttribute.java | 1 - .../processors/standard/ValidateRecord.java | 1 - .../processors/standard/TestListenHTTP.java | 4 +- .../apache/nifi/controller/MonitorMemory.java | 1 - .../rules/DisallowComponentType.java | 1 - .../nifi/dbcp/HikariCPConnectionPool.java | 5 -- .../nifi/dbcp/HadoopDBCPConnectionPool.java | 5 -- .../org/apache/nifi/json/JsonTreeReader.java | 1 - .../nifi/ssl/StandardSSLContextService.java | 4 -- 30 files changed, 131 insertions(+), 43 deletions(-) diff --git a/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java b/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java index 48bc181f85..1d039058f4 100644 --- a/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java +++ b/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java @@ -313,6 +313,24 @@ public final class PropertyDescriptor implements Comparable return this; } + /** + * Specifies the initial value and the default value that will be used + * if the user does not specify a value. When {@link #build()} is + * called, if Allowable Values have been set (see + * {@link #allowableValues(AllowableValue...)}) + * and the "Value" of the {@link DescribedValue} object is not + * the "Value" of one of those Allowable Values, an Exception will be thrown. + * If the Allowable Values have been set using the + * {@link #allowableValues(AllowableValue...)} method, the default value + * should be set providing the {@link AllowableValue} to this method. + * + * @param value default value holder + * @return the builder + */ + public Builder defaultValue(final DescribedValue value) { + return defaultValue(value != null ? value.getValue() : null); + } + public Builder dynamic(final boolean dynamic) { this.dynamic = dynamic; return this; diff --git a/nifi-api/src/main/java/org/apache/nifi/components/PropertyValue.java b/nifi-api/src/main/java/org/apache/nifi/components/PropertyValue.java index 42527d8345..096dd907ac 100644 --- a/nifi-api/src/main/java/org/apache/nifi/components/PropertyValue.java +++ b/nifi-api/src/main/java/org/apache/nifi/components/PropertyValue.java @@ -134,6 +134,18 @@ public interface PropertyValue { */ ResourceReferences asResources(); + /** + * @param the generic type of the enum used as allowable values + * @param enumType the class of the enum used as allowable values + * @return the DescribedValue enum entry whose value is the raw value of the + * this, or null if the value is not set. + * Throws an IllegalArgumentException if none of the enum entries correspond to the specified raw value. + * + * @throws IllegalArgumentException if the value of this + * does not point to any of the entries of the specified enum type. + */ + & DescribedValue> E asDescribedValue(Class enumType) throws IllegalArgumentException; + /** * @return true if the user has configured a value, or if the * {@link PropertyDescriptor} for the associated property has a default diff --git a/nifi-api/src/test/java/org/apache/nifi/components/TestPropertyDescriptor.java b/nifi-api/src/test/java/org/apache/nifi/components/TestPropertyDescriptor.java index 8e20a82e52..fcaa0f7a1f 100644 --- a/nifi-api/src/test/java/org/apache/nifi/components/TestPropertyDescriptor.java +++ b/nifi-api/src/test/java/org/apache/nifi/components/TestPropertyDescriptor.java @@ -69,6 +69,17 @@ public class TestPropertyDescriptor { assertNotNull(validDescriptorBuilder.build()); } + @Test + void testDefaultValueWithDescribedValue() { + final PropertyDescriptor propertyDescriptor = new PropertyDescriptor.Builder() + .name("defaultDescribedValueDescriptor") + .defaultValue(EnumAllowableValue.GREEN) + .build(); + + assertNotNull(propertyDescriptor); + assertEquals(EnumAllowableValue.GREEN.getValue(), propertyDescriptor.getDefaultValue()); + } + @Test void testAllowableValuesWithEnumClass() { final PropertyDescriptor propertyDescriptor = new PropertyDescriptor.Builder() diff --git a/nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/StandardPropertyValue.java b/nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/StandardPropertyValue.java index 6168d65ce5..142ba945bc 100644 --- a/nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/StandardPropertyValue.java +++ b/nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/StandardPropertyValue.java @@ -19,6 +19,8 @@ package org.apache.nifi.attribute.expression.language; import java.time.Duration; import java.util.Map; import java.util.concurrent.TimeUnit; + +import org.apache.nifi.components.DescribedValue; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.components.PropertyValue; import org.apache.nifi.components.resource.ResourceContext; @@ -234,6 +236,21 @@ public class StandardPropertyValue implements PropertyValue { return resourceContext.getResourceReferenceFactory().createResourceReferences(rawValue, propertyDescriptor.getResourceDefinition()); } + @Override + public & DescribedValue> E asDescribedValue(Class enumType) throws IllegalArgumentException { + if (rawValue == null) { + return null; + } + + for (E enumConstant : enumType.getEnumConstants()) { + if (enumConstant.getValue().equals(rawValue)) { + return enumConstant; + } + } + + throw new IllegalArgumentException(String.format("%s does not have an entry with value %s", enumType.getSimpleName(), rawValue)); + } + @Override public boolean isSet() { return rawValue != null; diff --git a/nifi-mock/src/main/java/org/apache/nifi/util/MockPropertyValue.java b/nifi-mock/src/main/java/org/apache/nifi/util/MockPropertyValue.java index fcf910fd62..226df960f5 100644 --- a/nifi-mock/src/main/java/org/apache/nifi/util/MockPropertyValue.java +++ b/nifi-mock/src/main/java/org/apache/nifi/util/MockPropertyValue.java @@ -25,6 +25,7 @@ import org.apache.nifi.annotation.behavior.InputRequirement; import org.apache.nifi.attribute.expression.language.Query; import org.apache.nifi.attribute.expression.language.Query.Range; import org.apache.nifi.attribute.expression.language.StandardPropertyValue; +import org.apache.nifi.components.DescribedValue; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.components.PropertyValue; import org.apache.nifi.components.resource.ResourceContext; @@ -322,6 +323,11 @@ public class MockPropertyValue implements PropertyValue { return new StandardResourceReferenceFactory().createResourceReferences(rawValue, propertyDescriptor.getResourceDefinition()); } + @Override + public & DescribedValue> E asDescribedValue(Class enumType) throws IllegalArgumentException { + ensureExpressionsEvaluated(); + return stdPropValue.asDescribedValue(enumType); + } @Override public boolean isSet() { diff --git a/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java b/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java index 6dc14b4bf0..35a9badf77 100644 --- a/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java +++ b/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java @@ -27,6 +27,7 @@ import org.apache.nifi.annotation.lifecycle.OnShutdown; import org.apache.nifi.annotation.lifecycle.OnStopped; import org.apache.nifi.annotation.lifecycle.OnUnscheduled; import org.apache.nifi.components.AllowableValue; +import org.apache.nifi.components.DescribedValue; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.components.ValidationContext; import org.apache.nifi.components.ValidationResult; @@ -579,7 +580,7 @@ public class StandardProcessorTestRunner implements TestRunner { } @Override - public ValidationResult setProperty(final PropertyDescriptor descriptor, final AllowableValue value) { + public ValidationResult setProperty(final PropertyDescriptor descriptor, final DescribedValue value) { return context.setProperty(descriptor, value.getValue()); } diff --git a/nifi-mock/src/main/java/org/apache/nifi/util/TestRunner.java b/nifi-mock/src/main/java/org/apache/nifi/util/TestRunner.java index 5d590f740b..640226a31e 100644 --- a/nifi-mock/src/main/java/org/apache/nifi/util/TestRunner.java +++ b/nifi-mock/src/main/java/org/apache/nifi/util/TestRunner.java @@ -17,6 +17,7 @@ package org.apache.nifi.util; import org.apache.nifi.components.AllowableValue; +import org.apache.nifi.components.DescribedValue; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.components.ValidationResult; import org.apache.nifi.controller.ControllerService; @@ -247,7 +248,7 @@ public interface TestRunner { * @param value allowable valu * @return result */ - ValidationResult setProperty(PropertyDescriptor descriptor, AllowableValue value); + ValidationResult setProperty(PropertyDescriptor descriptor, DescribedValue value); /** * Sets the annotation data. diff --git a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/PutAzureEventHub.java b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/PutAzureEventHub.java index 09c01a3701..ab95bab69d 100644 --- a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/PutAzureEventHub.java +++ b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/PutAzureEventHub.java @@ -99,7 +99,6 @@ public class PutAzureEventHub extends AbstractProcessor implements AzureEventHub .required(false) .expressionLanguageSupported(ExpressionLanguageScope.NONE) .addValidator(StandardValidators.ATTRIBUTE_KEY_VALIDATOR) - .defaultValue(null) .build(); static final PropertyDescriptor MAX_BATCH_SIZE = new PropertyDescriptor.Builder() .name("max-batch-size") diff --git a/nifi-nar-bundles/nifi-cdc/nifi-cdc-mysql-bundle/nifi-cdc-mysql-processors/src/main/java/org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java b/nifi-nar-bundles/nifi-cdc/nifi-cdc-mysql-bundle/nifi-cdc-mysql-processors/src/main/java/org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java index 9054dc401c..7761dea130 100644 --- a/nifi-nar-bundles/nifi-cdc/nifi-cdc-mysql-bundle/nifi-cdc-mysql-processors/src/main/java/org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java +++ b/nifi-nar-bundles/nifi-cdc/nifi-cdc-mysql-bundle/nifi-cdc-mysql-processors/src/main/java/org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java @@ -256,7 +256,6 @@ public class CaptureChangeMySQL extends AbstractSessionFactoryProcessor { .displayName("MySQL Driver Location(s)") .description("Comma-separated list of files/folders and/or URLs containing the MySQL driver JAR and its dependencies (if any). " + "For example '/var/tmp/mysql-connector-java-5.1.38-bin.jar'") - .defaultValue(null) .required(false) .identifiesExternalResource(ResourceCardinality.MULTIPLE, ResourceType.FILE, ResourceType.DIRECTORY, ResourceType.URL) .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) diff --git a/nifi-nar-bundles/nifi-extension-utils/nifi-dbcp-base/src/main/java/org/apache/nifi/dbcp/utils/DBCPProperties.java b/nifi-nar-bundles/nifi-extension-utils/nifi-dbcp-base/src/main/java/org/apache/nifi/dbcp/utils/DBCPProperties.java index d84cb99b09..21d6cdde25 100644 --- a/nifi-nar-bundles/nifi-extension-utils/nifi-dbcp-base/src/main/java/org/apache/nifi/dbcp/utils/DBCPProperties.java +++ b/nifi-nar-bundles/nifi-extension-utils/nifi-dbcp-base/src/main/java/org/apache/nifi/dbcp/utils/DBCPProperties.java @@ -38,7 +38,6 @@ public final class DBCPProperties { .name("Database Connection URL") .description("A database connection URL used to connect to a database. May contain database system name, host, port, database name and some parameters." + " The exact syntax of a database connection URL is specified by your DBMS.") - .defaultValue(null) .addValidator(new ConnectionUrlValidator()) .required(true) .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) @@ -47,7 +46,6 @@ public final class DBCPProperties { public static final PropertyDescriptor DB_USER = new PropertyDescriptor.Builder() .name("Database User") .description("Database user name") - .defaultValue(null) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) .build(); @@ -55,7 +53,6 @@ public final class DBCPProperties { public static final PropertyDescriptor DB_PASSWORD = new PropertyDescriptor.Builder() .name("Password") .description("The password for the database user") - .defaultValue(null) .required(false) .sensitive(true) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) @@ -66,7 +63,6 @@ public final class DBCPProperties { public static final PropertyDescriptor DB_DRIVERNAME = new PropertyDescriptor.Builder() .name("Database Driver Class Name") .description("Database driver class name") - .defaultValue(null) .required(true) .addValidator(new DriverClassValidator()) .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) @@ -76,7 +72,6 @@ public final class DBCPProperties { .name("database-driver-locations") .displayName("Database Driver Location(s)") .description("Comma-separated list of files/folders and/or URLs containing the driver JAR and its dependencies (if any). For example '/var/tmp/mariadb-java-client-1.1.7.jar'") - .defaultValue(null) .required(false) .identifiesExternalResource(ResourceCardinality.MULTIPLE, ResourceType.FILE, ResourceType.DIRECTORY, ResourceType.URL) .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/example/FullyDocumentedControllerService.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/example/FullyDocumentedControllerService.java index 4df7fdeeff..69a0f949a7 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/example/FullyDocumentedControllerService.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/example/FullyDocumentedControllerService.java @@ -40,11 +40,11 @@ import java.util.List; @SystemResourceConsideration(resource = SystemResource.MEMORY, description = "") public class FullyDocumentedControllerService extends AbstractControllerService implements SampleService { - public static final PropertyDescriptor KEYSTORE = new PropertyDescriptor.Builder().name("Keystore Filename").description("The fully-qualified filename of the Keystore").defaultValue(null) + public static final PropertyDescriptor KEYSTORE = new PropertyDescriptor.Builder().name("Keystore Filename").description("The fully-qualified filename of the Keystore") .addValidator(StandardValidators.FILE_EXISTS_VALIDATOR).sensitive(false).build(); public static final PropertyDescriptor KEYSTORE_TYPE = new PropertyDescriptor.Builder().name("Keystore Type").description("The Type of the Keystore").allowableValues("JKS", "PKCS12") .addValidator(StandardValidators.NON_EMPTY_VALIDATOR).defaultValue("JKS").sensitive(false).build(); - public static final PropertyDescriptor KEYSTORE_PASSWORD = new PropertyDescriptor.Builder().name("Keystore Password").defaultValue(null).description("The password for the Keystore") + public static final PropertyDescriptor KEYSTORE_PASSWORD = new PropertyDescriptor.Builder().name("Keystore Password").description("The password for the Keystore") .addValidator(StandardValidators.NON_EMPTY_VALIDATOR).sensitive(true).build(); private static final List properties; diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/repository/scheduling/ConnectableProcessContext.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/repository/scheduling/ConnectableProcessContext.java index 05b03e94ab..e7fc2e06e9 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/repository/scheduling/ConnectableProcessContext.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/repository/scheduling/ConnectableProcessContext.java @@ -24,6 +24,8 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; + +import org.apache.nifi.components.DescribedValue; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.components.PropertyValue; import org.apache.nifi.components.resource.ResourceReference; @@ -151,6 +153,11 @@ public class ConnectableProcessContext implements ProcessContext { return null; } + @Override + public & DescribedValue> E asDescribedValue(Class enumType) throws IllegalArgumentException { + return null; + } + @Override public boolean isSet() { return false; diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/test/java/org/apache/nifi/processor/TestStandardPropertyValue.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/test/java/org/apache/nifi/processor/TestStandardPropertyValue.java index 6f49d80b86..acd3e57269 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/test/java/org/apache/nifi/processor/TestStandardPropertyValue.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/test/java/org/apache/nifi/processor/TestStandardPropertyValue.java @@ -16,6 +16,7 @@ */ package org.apache.nifi.processor; +import org.apache.nifi.components.DescribedValue; import org.apache.nifi.parameter.ParameterLookup; import org.apache.nifi.attribute.expression.language.StandardPropertyValue; import org.apache.nifi.components.PropertyValue; @@ -32,6 +33,7 @@ import java.util.Set; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -108,6 +110,23 @@ public class TestStandardPropertyValue { assertThrows(NumberFormatException.class, substituted::asInteger); } + @Test + public void testGetValueAsDescribedValue() { + for (ExamplePropertyEnum enumValue : ExamplePropertyEnum.values()) { + final PropertyValue value = new StandardPropertyValue(enumValue.getValue(), lookup, ParameterLookup.EMPTY); + assertEquals(enumValue, value.asDescribedValue(ExamplePropertyEnum.class)); + } + + final PropertyValue nullValue = new StandardPropertyValue(null, lookup, ParameterLookup.EMPTY); + assertNull(nullValue.asDescribedValue(ExamplePropertyEnum.class)); + + IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> { + final PropertyValue invalidValue = new StandardPropertyValue("FOO", lookup, ParameterLookup.EMPTY); + invalidValue.asDescribedValue(ExamplePropertyEnum.class); + }); + assertEquals("ExamplePropertyEnum does not have an entry with value FOO", exception.getMessage()); + } + @Test public void testFileSize() { final PropertyValue value = new StandardPropertyValue("${fileSize}", lookup, ParameterLookup.EMPTY); @@ -177,4 +196,35 @@ public class TestStandardPropertyValue { } } + + private enum ExamplePropertyEnum implements DescribedValue { + ONE("One Value", "One Display", "One Description"), + OTHER("Other Value", "Other Display", "Other Description"), + ANOTHER("Another Value", "Another Display", "Another Description"); + + private final String value; + private final String displayName; + private final String description; + + ExamplePropertyEnum(final String value, final String displayName, final String description) { + this.value = value; + this.displayName = displayName; + this.description = description; + } + + @Override + public String getValue() { + return this.value; + } + + @Override + public String getDisplayName() { + return this.displayName; + } + + @Override + public String getDescription() { + return this.description; + } + } } diff --git a/nifi-nar-bundles/nifi-graph-bundle/nifi-other-graph-services/src/main/java/org/apache/nifi/graph/TinkerpopClientService.java b/nifi-nar-bundles/nifi-graph-bundle/nifi-other-graph-services/src/main/java/org/apache/nifi/graph/TinkerpopClientService.java index ac01bb7a3a..7350b3e684 100644 --- a/nifi-nar-bundles/nifi-graph-bundle/nifi-other-graph-services/src/main/java/org/apache/nifi/graph/TinkerpopClientService.java +++ b/nifi-nar-bundles/nifi-graph-bundle/nifi-other-graph-services/src/main/java/org/apache/nifi/graph/TinkerpopClientService.java @@ -189,7 +189,6 @@ public class TinkerpopClientService extends AbstractControllerService implements "classes specified in the YAML file. Additionally, any custom classes required for the groovy script to " + "work in the bytecode submission setting should also be contained in these JAR files.") .dependsOn(CONNECTION_SETTINGS, YAML_SETTINGS) - .defaultValue(null) .identifiesExternalResource(ResourceCardinality.MULTIPLE, ResourceType.FILE, ResourceType.DIRECTORY, ResourceType.URL) .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) .dynamicallyModifiesClasspath(true) diff --git a/nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/dbcp/hive/Hive3ConnectionPool.java b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/dbcp/hive/Hive3ConnectionPool.java index ef7beb8f22..94cc1755f8 100644 --- a/nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/dbcp/hive/Hive3ConnectionPool.java +++ b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/dbcp/hive/Hive3ConnectionPool.java @@ -106,7 +106,6 @@ public class Hive3ConnectionPool extends AbstractControllerService implements Hi .description("A database connection URL used to connect to a database. May contain database system name, host, port, database name and some parameters." + " The exact syntax of a database connection URL is specified by the Hive documentation. For example, the server principal is often included " + "as a connection parameter when connecting to a secure Hive server.") - .defaultValue(null) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .required(true) .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) @@ -127,7 +126,6 @@ public class Hive3ConnectionPool extends AbstractControllerService implements Hi .name("hive-db-user") .displayName("Database User") .description("Database user name") - .defaultValue(null) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) .build(); @@ -136,7 +134,6 @@ public class Hive3ConnectionPool extends AbstractControllerService implements Hi .name("hive-db-password") .displayName("Password") .description("The password for the database user") - .defaultValue(null) .required(false) .sensitive(true) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) diff --git a/nifi-nar-bundles/nifi-kudu-bundle/nifi-kudu-processors/src/main/java/org/apache/nifi/processors/kudu/AbstractKuduProcessor.java b/nifi-nar-bundles/nifi-kudu-bundle/nifi-kudu-processors/src/main/java/org/apache/nifi/processors/kudu/AbstractKuduProcessor.java index f10094baa8..c6671d4f80 100644 --- a/nifi-nar-bundles/nifi-kudu-bundle/nifi-kudu-processors/src/main/java/org/apache/nifi/processors/kudu/AbstractKuduProcessor.java +++ b/nifi-nar-bundles/nifi-kudu-bundle/nifi-kudu-processors/src/main/java/org/apache/nifi/processors/kudu/AbstractKuduProcessor.java @@ -375,7 +375,6 @@ public abstract class AbstractKuduProcessor extends AbstractProcessor { alterTable.addColumn(new ColumnSchema.ColumnSchemaBuilder(columnName, toKuduType(nifiType)) .nullable(true) - .defaultValue(null) .typeAttributes(getKuduTypeAttributes(nifiType)) .build()); diff --git a/nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/src/main/java/org/apache/nifi/snmp/processors/GetSNMP.java b/nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/src/main/java/org/apache/nifi/snmp/processors/GetSNMP.java index 2aa29ab8ef..6f5690bd48 100644 --- a/nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/src/main/java/org/apache/nifi/snmp/processors/GetSNMP.java +++ b/nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/src/main/java/org/apache/nifi/snmp/processors/GetSNMP.java @@ -107,7 +107,6 @@ public class GetSNMP extends AbstractSNMPProcessor { "the outgoing flowfile.") .required(false) .addValidator(StandardValidators.NON_BLANK_VALIDATOR) - .defaultValue(null) .build(); public static final Relationship REL_SUCCESS = new Relationship.Builder() diff --git a/nifi-nar-bundles/nifi-spark-bundle/nifi-livy-controller-service/src/main/java/org/apache/nifi/controller/livy/LivySessionController.java b/nifi-nar-bundles/nifi-spark-bundle/nifi-livy-controller-service/src/main/java/org/apache/nifi/controller/livy/LivySessionController.java index 65f8cbc96c..e83112a536 100644 --- a/nifi-nar-bundles/nifi-spark-bundle/nifi-livy-controller-service/src/main/java/org/apache/nifi/controller/livy/LivySessionController.java +++ b/nifi-nar-bundles/nifi-spark-bundle/nifi-livy-controller-service/src/main/java/org/apache/nifi/controller/livy/LivySessionController.java @@ -153,7 +153,6 @@ public class LivySessionController extends AbstractControllerService implements .required(false) .identifiesExternalResource(ResourceCardinality.MULTIPLE, ResourceType.FILE) .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) - .defaultValue(null) .build(); public static final PropertyDescriptor SSL_CONTEXT_SERVICE = new PropertyDescriptor.Builder() diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenHTTP.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenHTTP.java index 1a17512d00..2a286a3ea9 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenHTTP.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenHTTP.java @@ -197,7 +197,7 @@ public class ListenHTTP extends AbstractSessionFactoryProcessor { .description("HTTP Protocols supported for Application Layer Protocol Negotiation with TLS") .required(true) .allowableValues(HttpProtocolStrategy.class) - .defaultValue(HttpProtocolStrategy.HTTP_1_1.getValue()) + .defaultValue(HttpProtocolStrategy.HTTP_1_1) .dependsOn(SSL_CONTEXT_SERVICE) .build(); public static final PropertyDescriptor HEADERS_AS_ATTRIBUTES_REGEX = new PropertyDescriptor.Builder() @@ -414,7 +414,7 @@ public class ListenHTTP extends AbstractSessionFactoryProcessor { // get the configured port final int port = context.getProperty(PORT).evaluateAttributeExpressions().asInteger(); - final HttpProtocolStrategy httpProtocolStrategy = HttpProtocolStrategy.valueOf(context.getProperty(HTTP_PROTOCOL_STRATEGY).getValue()); + final HttpProtocolStrategy httpProtocolStrategy = context.getProperty(HTTP_PROTOCOL_STRATEGY).asDescribedValue(HttpProtocolStrategy.class); final ServerConnector connector = createServerConnector(server, port, sslContextService, diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeContent.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeContent.java index dfa09a42ed..c4908ddd8c 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeContent.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeContent.java @@ -325,7 +325,6 @@ public class MergeContent extends BinFiles { .required(false) .expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES) .addValidator(StandardValidators.ATTRIBUTE_KEY_VALIDATOR) - .defaultValue(null) .dependsOn(MERGE_STRATEGY, MERGE_STRATEGY_BIN_PACK) .build(); diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeRecord.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeRecord.java index de1e910758..f665ca552f 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeRecord.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeRecord.java @@ -220,7 +220,6 @@ public class MergeRecord extends AbstractSessionFactoryProcessor { .required(false) .expressionLanguageSupported(ExpressionLanguageScope.NONE) .addValidator(StandardValidators.ATTRIBUTE_KEY_VALIDATOR) - .defaultValue(null) .build(); public static final PropertyDescriptor MIN_SIZE = new PropertyDescriptor.Builder() .name("min-bin-size") diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanAttribute.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanAttribute.java index 1100cfa026..408d9f92c2 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanAttribute.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ScanAttribute.java @@ -96,7 +96,6 @@ public class ScanAttribute extends AbstractProcessor { + "the dictionary will be used and each term will consist of the text of the entire line in the file") .required(false) .addValidator(StandardValidators.createRegexValidator(0, 1, false)) - .defaultValue(null) .build(); private List properties; diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ValidateRecord.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ValidateRecord.java index 34ce727335..30c092781a 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ValidateRecord.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ValidateRecord.java @@ -201,7 +201,6 @@ public class ValidateRecord extends AbstractProcessor { .required(false) .expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES) .addValidator(StandardValidators.ATTRIBUTE_KEY_VALIDATOR) - .defaultValue(null) .build(); static final PropertyDescriptor MAX_VALIDATION_DETAILS_LENGTH = new PropertyDescriptor.Builder() .name("maximum-validation-details-length") diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenHTTP.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenHTTP.java index 734f1f2a4f..714b64aad5 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenHTTP.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenHTTP.java @@ -236,7 +236,7 @@ public class TestListenHTTP { configureProcessorSslContextService(ListenHTTP.ClientAuthentication.AUTO, serverNoTruststoreConfiguration); runner.setProperty(ListenHTTP.BASE_PATH, HTTP_BASE_PATH); - runner.setProperty(ListenHTTP.HTTP_PROTOCOL_STRATEGY, HttpProtocolStrategy.H2_HTTP_1_1.getValue()); + runner.setProperty(ListenHTTP.HTTP_PROTOCOL_STRATEGY, HttpProtocolStrategy.H2_HTTP_1_1); runner.assertValid(); testPOSTRequestsReceived(HttpServletResponse.SC_OK, true, false); @@ -248,7 +248,7 @@ public class TestListenHTTP { runner.setProperty(ListenHTTP.BASE_PATH, HTTP_BASE_PATH); runner.setProperty(ListenHTTP.RETURN_CODE, Integer.toString(HttpServletResponse.SC_NO_CONTENT)); - runner.setProperty(ListenHTTP.HTTP_PROTOCOL_STRATEGY, HttpProtocolStrategy.H2.getValue()); + runner.setProperty(ListenHTTP.HTTP_PROTOCOL_STRATEGY, HttpProtocolStrategy.H2); runner.assertValid(); testPOSTRequestsReceived(HttpServletResponse.SC_NO_CONTENT, true, false); diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-reporting-tasks/src/main/java/org/apache/nifi/controller/MonitorMemory.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-reporting-tasks/src/main/java/org/apache/nifi/controller/MonitorMemory.java index 08078482c6..5361ff01f2 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-reporting-tasks/src/main/java/org/apache/nifi/controller/MonitorMemory.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-reporting-tasks/src/main/java/org/apache/nifi/controller/MonitorMemory.java @@ -134,7 +134,6 @@ public class MonitorMemory extends AbstractReportingTask { .description("Indicates how often this reporting task should report bulletins while the memory utilization exceeds the configured threshold") .required(false) .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR) - .defaultValue(null) .build(); public static final Pattern PERCENTAGE_PATTERN = Pattern.compile("\\d{1,2}%"); diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-rules/src/main/java/org/apache/nifi/flowanalysis/rules/DisallowComponentType.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-rules/src/main/java/org/apache/nifi/flowanalysis/rules/DisallowComponentType.java index 79f635a119..cacb5a81dd 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-rules/src/main/java/org/apache/nifi/flowanalysis/rules/DisallowComponentType.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-rules/src/main/java/org/apache/nifi/flowanalysis/rules/DisallowComponentType.java @@ -42,7 +42,6 @@ public class DisallowComponentType extends AbstractFlowAnalysisRule { " Either the simple or the fully qualified name of the type should be provided.") .required(true) .addValidator(StandardValidators.NON_BLANK_VALIDATOR) - .defaultValue(null) .build(); private final static List propertyDescriptors; diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-hikari-dbcp-service/src/main/java/org/apache/nifi/dbcp/HikariCPConnectionPool.java b/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-hikari-dbcp-service/src/main/java/org/apache/nifi/dbcp/HikariCPConnectionPool.java index b78ad2952c..128701a610 100644 --- a/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-hikari-dbcp-service/src/main/java/org/apache/nifi/dbcp/HikariCPConnectionPool.java +++ b/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-hikari-dbcp-service/src/main/java/org/apache/nifi/dbcp/HikariCPConnectionPool.java @@ -86,7 +86,6 @@ public class HikariCPConnectionPool extends AbstractControllerService implements .displayName("Database Connection URL") .description("A database connection URL used to connect to a database. May contain database system name, host, port, database name and some parameters." + " The exact syntax of a database connection URL is specified by your DBMS.") - .defaultValue(null) .addValidator(new ConnectionUrlValidator()) .required(true) .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) @@ -96,7 +95,6 @@ public class HikariCPConnectionPool extends AbstractControllerService implements .name("hikaricp-driver-classname") .displayName("Database Driver Class Name") .description("The fully-qualified class name of the JDBC driver. Example: com.mysql.jdbc.Driver") - .defaultValue(null) .required(true) .addValidator(new DriverClassValidator()) .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) @@ -106,7 +104,6 @@ public class HikariCPConnectionPool extends AbstractControllerService implements .name("hikaricp-driver-locations") .displayName("Database Driver Location(s)") .description("Comma-separated list of files/folders and/or URLs containing the driver JAR and its dependencies (if any). For example '/var/tmp/mariadb-java-client-1.1.7.jar'") - .defaultValue(null) .required(false) .identifiesExternalResource(ResourceCardinality.MULTIPLE, ResourceType.FILE, ResourceType.DIRECTORY, ResourceType.URL) .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) @@ -117,7 +114,6 @@ public class HikariCPConnectionPool extends AbstractControllerService implements .name("hikaricp-username") .displayName("Database User") .description("Database user name") - .defaultValue(null) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) .build(); @@ -126,7 +122,6 @@ public class HikariCPConnectionPool extends AbstractControllerService implements .name("hikaricp-password") .displayName("Password") .description("The password for the database user") - .defaultValue(null) .required(false) .sensitive(true) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-hadoop-dbcp-service-bundle/nifi-hadoop-dbcp-service/src/main/java/org/apache/nifi/dbcp/HadoopDBCPConnectionPool.java b/nifi-nar-bundles/nifi-standard-services/nifi-hadoop-dbcp-service-bundle/nifi-hadoop-dbcp-service/src/main/java/org/apache/nifi/dbcp/HadoopDBCPConnectionPool.java index 27b86f2706..a031f15efb 100644 --- a/nifi-nar-bundles/nifi-standard-services/nifi-hadoop-dbcp-service-bundle/nifi-hadoop-dbcp-service/src/main/java/org/apache/nifi/dbcp/HadoopDBCPConnectionPool.java +++ b/nifi-nar-bundles/nifi-standard-services/nifi-hadoop-dbcp-service-bundle/nifi-hadoop-dbcp-service/src/main/java/org/apache/nifi/dbcp/HadoopDBCPConnectionPool.java @@ -104,7 +104,6 @@ public class HadoopDBCPConnectionPool extends AbstractControllerService implemen .name("Database Connection URL") .description("A database connection URL used to connect to a database. May contain database system name, host, port, database name and some parameters." + " The exact syntax of a database connection URL is specified by your DBMS.") - .defaultValue(null) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .required(true) .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) @@ -113,7 +112,6 @@ public class HadoopDBCPConnectionPool extends AbstractControllerService implemen public static final PropertyDescriptor DB_DRIVERNAME = new PropertyDescriptor.Builder() .name("Database Driver Class Name") .description("Database driver class name") - .defaultValue(null) .required(true) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) @@ -125,7 +123,6 @@ public class HadoopDBCPConnectionPool extends AbstractControllerService implemen .description("Comma-separated list of files/folders and/or URLs containing the driver JAR and its dependencies (if any). " + "For example '/var/tmp/phoenix-client.jar'. NOTE: It is required that the resources specified by this property provide " + "the classes from hadoop-common, such as Configuration and UserGroupInformation.") - .defaultValue(null) .required(true) .identifiesExternalResource(ResourceCardinality.MULTIPLE, ResourceType.FILE, ResourceType.DIRECTORY, ResourceType.URL) .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) @@ -147,7 +144,6 @@ public class HadoopDBCPConnectionPool extends AbstractControllerService implemen public static final PropertyDescriptor DB_USER = new PropertyDescriptor.Builder() .name("Database User") .description("The user for the database") - .defaultValue(null) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) .build(); @@ -155,7 +151,6 @@ public class HadoopDBCPConnectionPool extends AbstractControllerService implemen public static final PropertyDescriptor DB_PASSWORD = new PropertyDescriptor.Builder() .name("Password") .description("The password for the database user") - .defaultValue(null) .required(false) .sensitive(true) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonTreeReader.java b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonTreeReader.java index 27f54afc72..6ab294337a 100644 --- a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonTreeReader.java +++ b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonTreeReader.java @@ -94,7 +94,6 @@ public class JsonTreeReader extends SchemaRegistryService implements RecordReade .description("Skips forward to the given nested JSON field (array or object) to begin processing.") .required(false) .addValidator(StandardValidators.NON_BLANK_VALIDATOR) - .defaultValue(null) .dependsOn(STARTING_FIELD_STRATEGY, StartingFieldStrategy.NESTED_FIELD.name()) .build(); diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java b/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java index e727795fac..617a3ef8d5 100644 --- a/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java +++ b/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java @@ -71,7 +71,6 @@ public class StandardSSLContextService extends AbstractControllerService impleme .name("Truststore Filename") .description("The fully-qualified filename of the Truststore") .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) - .defaultValue(null) .identifiesExternalResource(ResourceCardinality.SINGLE, ResourceType.FILE) .sensitive(false) .build(); @@ -85,7 +84,6 @@ public class StandardSSLContextService extends AbstractControllerService impleme public static final PropertyDescriptor TRUSTSTORE_PASSWORD = new PropertyDescriptor.Builder() .name("Truststore Password") .description("The password for the Truststore") - .defaultValue(null) .addValidator(Validator.VALID) .required(false) .sensitive(true) @@ -94,7 +92,6 @@ public class StandardSSLContextService extends AbstractControllerService impleme .name("Keystore Filename") .description("The fully-qualified filename of the Keystore") .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) - .defaultValue(null) .identifiesExternalResource(ResourceCardinality.SINGLE, ResourceType.FILE) .sensitive(false) .build(); @@ -107,7 +104,6 @@ public class StandardSSLContextService extends AbstractControllerService impleme .build(); public static final PropertyDescriptor KEYSTORE_PASSWORD = new PropertyDescriptor.Builder() .name("Keystore Password") - .defaultValue(null) .description("The password for the Keystore") .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .sensitive(true)