public ValidationResult validate()

in src/main/java/org/apache/nifi/processor/util/StandardValidators.java [356:377]


        public ValidationResult validate(final String subject, final String input, final ValidationContext context) {
            String evaluatedInput = input;
            if (context.isExpressionLanguageSupported(subject) && context.isExpressionLanguagePresent(input)) {
                try {
                    PropertyValue propertyValue = context.newPropertyValue(input);
                    evaluatedInput = (propertyValue == null) ? input : propertyValue.evaluateAttributeExpressions().getValue();
                } catch (final Exception e) {
                    return new ValidationResult.Builder().subject(subject).input(input).explanation("Not a valid expression").valid(false).build();
                }
            }

            String reason = null;
            try {
                if (!Charset.isSupported(evaluatedInput)) {
                    reason = "Character Set is not supported by this JVM.";
                }
            } catch (final IllegalArgumentException iae) {
                reason = "Character Set value is null or is not supported by this JVM.";
            }

            return new ValidationResult.Builder().subject(subject).input(evaluatedInput).explanation(reason).valid(reason == null).build();
        }