NIFI-12527: Removed deprecated Session Cache Size property from JMS processors

Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #8172.
This commit is contained in:
Peter Turcsanyi 2023-12-19 22:55:26 +01:00 committed by Pierre Villard
parent 703948b1d6
commit 4727d591d1
No known key found for this signature in database
GPG Key ID: F92A93B30C07C6D5
3 changed files with 6 additions and 10 deletions

View File

@ -31,6 +31,7 @@ import org.apache.nifi.jms.cf.JMSConnectionFactoryProvider;
import org.apache.nifi.jms.cf.JMSConnectionFactoryProviderDefinition;
import org.apache.nifi.jms.cf.JndiJmsConnectionFactoryHandler;
import org.apache.nifi.jms.cf.JndiJmsConnectionFactoryProperties;
import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.AbstractProcessor;
import org.apache.nifi.processor.ProcessContext;
import org.apache.nifi.processor.ProcessSession;
@ -109,14 +110,6 @@ public abstract class AbstractJMSProcessor<T extends JMSWorker> extends Abstract
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
.build();
static final PropertyDescriptor SESSION_CACHE_SIZE = new PropertyDescriptor.Builder()
.name("Session Cache size")
.displayName("Session Cache Size")
.description("This property is deprecated and no longer has any effect on the Processor. It will be removed in a later version.")
.required(false)
.defaultValue("1")
.addValidator(StandardValidators.NON_NEGATIVE_INTEGER_VALIDATOR)
.build();
static final PropertyDescriptor CHARSET = new PropertyDescriptor.Builder()
.name("character-set")
.displayName("Character Set")
@ -187,6 +180,11 @@ public abstract class AbstractJMSProcessor<T extends JMSWorker> extends Abstract
.build();
}
@Override
public void migrateProperties(final PropertyConfiguration config) {
config.removeProperty("Session Cache size");
}
@Override
protected Collection<ValidationResult> customValidate(ValidationContext validationContext) {
return new ConnectionFactoryConfigValidator(validationContext).validateConnectionFactoryConfig();

View File

@ -239,7 +239,6 @@ public class ConsumeJMS extends AbstractJMSProcessor<JMSConsumer> {
_propertyDescriptors.add(USER);
_propertyDescriptors.add(PASSWORD);
_propertyDescriptors.add(CLIENT_ID);
_propertyDescriptors.add(SESSION_CACHE_SIZE);
// change the validator on CHARSET property
PropertyDescriptor charsetWithELValidatorProperty = new PropertyDescriptor.Builder()

View File

@ -178,7 +178,6 @@ public class PublishJMS extends AbstractJMSProcessor<JMSPublisher> {
_propertyDescriptors.add(USER);
_propertyDescriptors.add(PASSWORD);
_propertyDescriptors.add(CLIENT_ID);
_propertyDescriptors.add(SESSION_CACHE_SIZE);
_propertyDescriptors.add(MESSAGE_BODY);
_propertyDescriptors.add(CHARSET);