Skip to content

run format #10445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public static int getIntOrZero(final JsonNode json, final List<String> keys) {
public static Map<String, Object> flatten(final JsonNode node) {
if (node.isObject()) {
final Map<String, Object> output = new HashMap<>();
for (final Iterator<Entry<String, JsonNode>> it = node.fields(); it.hasNext(); ) {
for (final Iterator<Entry<String, JsonNode>> it = node.fields(); it.hasNext();) {
final Entry<String, JsonNode> entry = it.next();
final String field = entry.getKey();
final JsonNode value = entry.getValue();
Expand Down Expand Up @@ -239,8 +239,8 @@ public static Map<String, Object> flatten(final JsonNode node) {
/**
* Prepend all keys in subMap with prefix, then merge that map into originalMap.
* <p>
* If subMap contains a null key, then instead it is replaced with prefix. I.e. {null: value} is treated as {prefix: value} when merging into
* originalMap.
* If subMap contains a null key, then instead it is replaced with prefix. I.e. {null: value} is
* treated as {prefix: value} when merging into originalMap.
*/
public static void mergeMaps(final Map<String, Object> originalMap, final String prefix, final Map<String, Object> subMap) {
originalMap.putAll(subMap.entrySet().stream().collect(toMap(
Expand All @@ -256,7 +256,8 @@ public static void mergeMaps(final Map<String, Object> originalMap, final String
}

/**
* By the Jackson DefaultPrettyPrinter prints objects with an extra space as follows: {"name" : "airbyte"}. We prefer {"name": "airbyte"}.
* By the Jackson DefaultPrettyPrinter prints objects with an extra space as follows: {"name" :
* "airbyte"}. We prefer {"name": "airbyte"}.
*/
private static class JsonPrettyPrinter extends DefaultPrettyPrinter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ private static Map<String, Object> configToMetadata(final JsonNode config, final
final Map<String, Object> output = new HashMap<>();
final JsonNode maybeProperties = schema.get("properties");

// If additionalProperties is not set, or it's a boolean, then there's no schema for additional properties. Use the accept-all schema.
// If additionalProperties is not set, or it's a boolean, then there's no schema for additional
// properties. Use the accept-all schema.
// Otherwise, it's an actual schema.
final JsonNode maybeAdditionalProperties = schema.get("additionalProperties");
final JsonNode additionalPropertiesSchema;
Expand All @@ -244,7 +245,7 @@ private static Map<String, Object> configToMetadata(final JsonNode config, final
additionalPropertiesSchema = maybeAdditionalProperties;
}

for (final Iterator<Entry<String, JsonNode>> it = config.fields(); it.hasNext(); ) {
for (final Iterator<Entry<String, JsonNode>> it = config.fields(); it.hasNext();) {
final Entry<String, JsonNode> entry = it.next();
final String field = entry.getKey();
final JsonNode value = entry.getValue();
Expand Down