This is an automated email from the ASF dual-hosted git repository.

mthomsen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/master by this push:
     new 595835f  NIFI-6281 Rename ISO8061_INSTANT_VALIDATOR to 
ISO8601_INSTANT_VALIDATOR
595835f is described below

commit 595835f6ee4fa024799827f89d9b55dfabcced23
Author: Alan Jackoway <[email protected]>
AuthorDate: Thu May 9 09:57:47 2019 -0400

    NIFI-6281 Rename ISO8061_INSTANT_VALIDATOR to ISO8601_INSTANT_VALIDATOR
    
    ISO8061_INSTANT_VALIDATOR was misnamed - the correct standard is ISO 8601.
    Also updated the error messages to have spaces in them, which is how the 
ISO site
    displays them.
    
    This closes #3465
    
    Signed-off-by: Mike Thomsen <[email protected]>
---
 .../java/org/apache/nifi/processor/util/StandardValidators.java  | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git 
a/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/processor/util/StandardValidators.java
 
b/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/processor/util/StandardValidators.java
index 51e41db..6bf9aaa 100644
--- 
a/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/processor/util/StandardValidators.java
+++ 
b/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/processor/util/StandardValidators.java
@@ -273,18 +273,21 @@ public class StandardValidators {
         }
     };
 
-    public static final Validator ISO8061_INSTANT_VALIDATOR = new Validator() {
+    public static final Validator ISO8601_INSTANT_VALIDATOR = new Validator() {
         @Override
         public ValidationResult validate(final String subject, final String 
input, final ValidationContext context) {
 
             try {
                 Instant.parse(input);
-                return new 
ValidationResult.Builder().subject(subject).input(input).explanation("Valid 
ISO8061 Instant Date").valid(true).build();
+                return new 
ValidationResult.Builder().subject(subject).input(input).explanation("Valid ISO 
8601 Instant Date").valid(true).build();
             } catch (final Exception e) {
-                return new 
ValidationResult.Builder().subject(subject).input(input).explanation("Not a 
valid ISO8061 Instant Date, please enter in UTC time").valid(false).build();
+                return new 
ValidationResult.Builder().subject(subject).input(input).explanation("Not a 
valid ISO 8601 Instant Date, please enter in UTC time").valid(false).build();
             }
         }
     };
+    // Old name retained for compatibility
+    @Deprecated
+    public static final Validator ISO8061_INSTANT_VALIDATOR = 
ISO8601_INSTANT_VALIDATOR;
 
     public static final Validator NON_NEGATIVE_INTEGER_VALIDATOR = new 
Validator() {
         @Override

Reply via email to