Skip to content

Commit c76c8ad

Browse files
committed
Fix OuraServiceUserRepositoryLegacy and OuraRingConfigurationConverter
1 parent 985d433 commit c76c8ad

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

kafka-connect-oura-source/src/main/java/org/radarbase/connect/rest/oura/user/OuraServiceUserRepositoryLegacy.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
public class OuraServiceUserRepositoryLegacy extends OuraUserRepository {
6464
Instant MIN_INSTANT = Instant.EPOCH;
6565

66-
public static final JsonFactory JSON_FACTORY = new JsonFactory();
67-
public static final ObjectReader JSON_READER = new ObjectMapper(JSON_FACTORY)
66+
protected static final JsonFactory JSON_FACTORY = new JsonFactory();
67+
protected static final ObjectReader JSON_READER = new ObjectMapper(JSON_FACTORY)
6868
.registerModule(new JavaTimeModule())
6969
.reader();
7070
private static final Logger logger = LoggerFactory.getLogger(OuraServiceUserRepositoryLegacy.class);

oura-library/src/main/kotlin/org/radarbase/oura/converter/OuraRingConfigurationConverter.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ class OuraRingConfigurationConverter(
4848
design = data.get("design").textValue()?.classifyDesign()
4949
firmwareVersion = data.get("firmware_version").textValue()
5050
hardwareType = data.get("hardware_type").textValue()?.classifyHardware()
51-
setUpAt = if (setupTime == null) null else setupTime.toEpochMilli() / 1000.0
51+
setUpAt =
52+
setupTime?.toEpochMilli()?.let {
53+
it / 1000.0
54+
}
5255
size = data.get("size").intValue()
5356
}.build()
5457
}

0 commit comments

Comments
 (0)