Skip to content

Commit

Permalink
Merge pull request #14 from an0r0c/java8-compatibility
Browse files Browse the repository at this point in the history
Downgrade Underscore to be java 8 compatible
  • Loading branch information
an0r0c authored Feb 27, 2023
2 parents 2266d9d + 61aa069 commit de655e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<groupId>kafka-connect-transform-record2jsonstring</groupId>
<artifactId>kafka-connect-transform-record2jsonstring</artifactId>
<version>1.0</version>
<version>1.3</version>
<description>Kafka Connect single message transform (SMT) taking a record (with schema) and transforms it into a single JSON String
</description>
<url>https://github.com/an0r0c/kafka-connect-transform-tojsonstring</url>
Expand Down Expand Up @@ -132,7 +132,7 @@
<dependency>
<groupId>com.github.javadev</groupId>
<artifactId>underscore</artifactId>
<version>1.82</version>
<version>1.81</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.github.cedelsb.kafka.connect.smt;

import org.apache.kafka.connect.data.*;
import org.apache.kafka.connect.data.Date;
import org.apache.kafka.connect.sink.SinkRecord;
import org.junit.Before;
import org.junit.Test;
Expand All @@ -26,10 +27,7 @@
import java.time.LocalTime;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
Expand Down Expand Up @@ -247,6 +245,8 @@ public void transformRecordValue2JsonStringLogicalTypesDatetimeAsStringWithPatte
props.put("json.writer.datetime.pattern", "dd.MM.yyyy HH:mm z");
props.put("json.writer.datetime.zoneid", "CET");

Locale.setDefault(new Locale("en", "GB")); // Force Locale to be English so that the timezone display name is properly returned

valueSmt.configure(props);

final SinkRecord record = new SinkRecord(null, 0, null, "test", simpleStructSchema, simpleStruct, 0);
Expand Down

0 comments on commit de655e9

Please sign in to comment.