Skip to content

Commit

Permalink
Case insensitive comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
cavemandaveman committed Aug 6, 2018
1 parent bc13860 commit 08df43a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
6 changes: 3 additions & 3 deletions nifi-standardize-date-nar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<parent>
<groupId>com.nineteen04labs</groupId>
<artifactId>nifi-standardize-date-bundle</artifactId>
<version>18.07.5</version>
<version>18.08.0</version>
</parent>

<artifactId>nifi-standardize-date-nar</artifactId>
<version>18.07.5</version>
<version>18.08.0</version>
<packaging>nar</packaging>
<properties>
<maven.javadoc.skip>true</maven.javadoc.skip>
Expand All @@ -34,7 +34,7 @@
<dependency>
<groupId>com.nineteen04labs</groupId>
<artifactId>nifi-standardize-date-processors</artifactId>
<version>18.07.5</version>
<version>18.08.0</version>
</dependency>
</dependencies>

Expand Down
7 changes: 6 additions & 1 deletion nifi-standardize-date-processors/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>com.nineteen04labs</groupId>
<artifactId>nifi-standardize-date-bundle</artifactId>
<version>18.07.5</version>
<version>18.08.0</version>
</parent>

<artifactId>nifi-standardize-date-processors</artifactId>
Expand All @@ -47,6 +47,11 @@
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.2</version>
</dependency>
<!-- Import custom avro that we built below to handle union file types -->
<dependency>
<groupId>org.apache.avro</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.io.Reader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
Expand All @@ -41,6 +40,7 @@

import org.apache.avro.Schema;
import org.apache.avro.Schema.Type;
import org.apache.commons.collections4.map.CaseInsensitiveMap;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.components.PropertyDescriptor;
Expand Down Expand Up @@ -106,7 +106,8 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
session.write(flowFile, new StreamCallback(){
@Override
public void process(InputStream in, OutputStream out) throws IOException {
Map<String,String> invalidDates = new ObjectMapper().readValue(invalidDatesString, new TypeReference<HashMap<String,Object>>(){});
Map<String,String> invalidDates = new ObjectMapper()
.readValue(invalidDatesString, new TypeReference<CaseInsensitiveMap<String,String>>(){});

JsonFactory jsonFactory = new JsonFactory().setRootValueSeparator(null);

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<groupId>com.nineteen04labs</groupId>
<artifactId>nifi-standardize-date-bundle</artifactId>
<version>18.07.5</version>
<version>18.08.0</version>
<packaging>pom</packaging>

<modules>
Expand Down

0 comments on commit 08df43a

Please sign in to comment.