summaryrefslogtreecommitdiffstats
path: root/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-12-04 09:20:04 +0000
committerliamfallon <liam.fallon@est.tech>2019-12-04 17:14:11 +0000
commit7a0a44eac6167cfeff935c39f2c3f20d3a893c3e (patch)
tree5874e4b8f0e4b5ce8cc222912833029729fe4ed3 /plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java
parent9253f81d14a5217479ca8e59efb198eaa32ec9f0 (diff)
Minor changes for new Eclipse checkstyle checks
The laest Eclipse checkstyle version 8.26.0 does more thorough checking and identified a number of small issues in the apex-pdp codebase. This review fixes those issues. Issue-ID: POLICY-1913 Change-Id: I30ba25e3e425c6d54c77f925e8da3ab841a8357c Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java')
-rw-r--r--plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroSchemaKeyTranslationUtilities.java36
1 files changed, 19 insertions, 17 deletions
diff --git a/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroSchemaKeyTranslationUtilities.java b/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroSchemaKeyTranslationUtilities.java
index b4c8737dd..60b394ccc 100644
--- a/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroSchemaKeyTranslationUtilities.java
+++ b/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroSchemaKeyTranslationUtilities.java
@@ -5,15 +5,15 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
@@ -29,7 +29,7 @@ import java.util.Map.Entry;
/**
* This static final class contains utility methods for Avro schemas.
- *
+ *
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
public final class AvroSchemaKeyTranslationUtilities {
@@ -42,11 +42,13 @@ public final class AvroSchemaKeyTranslationUtilities {
/**
* Default constructor to avoid subclassing.
*/
- private AvroSchemaKeyTranslationUtilities() {}
+ private AvroSchemaKeyTranslationUtilities() {
+ // Private constructor to prevent subclassing
+ }
/**
- * Translate characters in JSON keys to values that are legal in Avro. Avro names must start
- * with [A-Za-z_] and subsequently contain only [A-Za-z0-9_]
+ * Translate characters in JSON keys to values that are legal in Avro. Avro names must start with [A-Za-z_] and
+ * subsequently contain only [A-Za-z0-9_]
*
* @param jsonString The JSON string to translate
* @param revert True if we want to revert the field names to their original values
@@ -58,8 +60,8 @@ public final class AvroSchemaKeyTranslationUtilities {
}
// Create a JSON element for the incoming JSON string
- final JsonElement jsonElement =
- new GsonBuilder().serializeNulls().create().fromJson(jsonString, JsonElement.class);
+ final JsonElement jsonElement = new GsonBuilder().serializeNulls().create().fromJson(jsonString,
+ JsonElement.class);
final JsonElement translatedJsonElement = translateIllegalKeys(jsonElement, revert);
@@ -67,8 +69,8 @@ public final class AvroSchemaKeyTranslationUtilities {
}
/**
- * Translate characters in JSON keys to values that are legal in Avro. Avro names must start
- * with [A-Za-z_] and subsequently contain only [A-Za-z0-9_]
+ * Translate characters in JSON keys to values that are legal in Avro. Avro names must start with [A-Za-z_] and
+ * subsequently contain only [A-Za-z0-9_]
*
* @param jsonElement The JSON element to translate
* @param revert True if we want to revert the field names to their original values
@@ -86,8 +88,8 @@ public final class AvroSchemaKeyTranslationUtilities {
}
/**
- * Translate characters in JSON keys to values that are legal in Avro. Avro names must start
- * with [A-Za-z_] and subsequently contain only [A-Za-z0-9_]
+ * Translate characters in JSON keys to values that are legal in Avro. Avro names must start with [A-Za-z_] and
+ * subsequently contain only [A-Za-z0-9_]
*
* @param jsonObject The JSON object to translate
* @param revert True if we want to revert the field names to their original values
@@ -105,8 +107,8 @@ public final class AvroSchemaKeyTranslationUtilities {
}
/**
- * Translate characters in JSON keys to values that are legal in Avro. Avro names must start
- * with [A-Za-z_] and subsequently contain only [A-Za-z0-9_]
+ * Translate characters in JSON keys to values that are legal in Avro. Avro names must start with [A-Za-z_] and
+ * subsequently contain only [A-Za-z0-9_]
*
* @param jsonArray The JSON array to translate
* @param revert True if we want to revert the field names to their original values
@@ -123,8 +125,8 @@ public final class AvroSchemaKeyTranslationUtilities {
}
/**
- * Translate characters in a single JSON key to values that are legal in Avro. Avro names must
- * start with [A-Za-z_] and subsequently contain only [A-Za-z0-9_]
+ * Translate characters in a single JSON key to values that are legal in Avro. Avro names must start with [A-Za-z_]
+ * and subsequently contain only [A-Za-z0-9_]
*
* @param key The key to translate
* @param revert True if we want to revert the field names to their original values