1
0
mirror of synced 2025-12-23 21:03:15 -05:00

update all connectors for new CDK version and more stringent javac checks

This commit is contained in:
Stephane Geneix
2023-11-02 15:24:58 -07:00
parent e0987e6205
commit 18ad87bbd1
71 changed files with 507 additions and 21 deletions

View File

@@ -163,6 +163,7 @@ public class MongoUtil {
try (final MongoCursor<Document> cursor = output.allowDiskUse(true).cursor()) {
if (cursor.hasNext()) {
final Document stats = cursor.next();
@SuppressWarnings("unchecked")
final Map<String, Object> storageStats = (Map<String, Object>) stats.get(MongoConstants.STORAGE_STATS_KEY);
if (storageStats != null && !storageStats.isEmpty()) {
return Optional.of(new CollectionStatistics((Number) storageStats.get(MongoConstants.COLLECTION_STATISTICS_COUNT_KEY),
@@ -254,6 +255,7 @@ public class MongoUtil {
try (final MongoCursor<Document> cursor = output.allowDiskUse(true).cursor()) {
while (cursor.hasNext()) {
@SuppressWarnings("unchecked")
final Map<String, String> fields = ((List<Map<String, String>>) cursor.next().get("fields")).get(0);
discoveredFields.addAll(fields.entrySet().stream()
.map(e -> new MongoField(e.getKey(), convertToSchemaType(e.getValue())))