summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/src/main/java/org/onap/policy/common/utils/coder/PropertyCoder.java6
-rw-r--r--utils/src/test/java/org/onap/policy/common/utils/coder/PropertyCoderTest.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/utils/src/main/java/org/onap/policy/common/utils/coder/PropertyCoder.java b/utils/src/main/java/org/onap/policy/common/utils/coder/PropertyCoder.java
index 972cba5f..3036d353 100644
--- a/utils/src/main/java/org/onap/policy/common/utils/coder/PropertyCoder.java
+++ b/utils/src/main/java/org/onap/policy/common/utils/coder/PropertyCoder.java
@@ -54,12 +54,12 @@ public class PropertyCoder {
* @param clazz class T object
* @return a class T object
*/
- public <T> T decode(String json, String keyProperty, Class<T> clazz) throws CoderException {
+ public <T> T decode(String json, String keyProperty, Class<T> clazz) {
JsonElement jsonElement = GSON.fromJson(json, JsonElement.class);
return new MyDecoder(jsonElement, keyProperty).decrypt(jsonElement, clazz);
}
- public <T> T decode(Reader reader, String keyProperty, Class<T> clazz) throws CoderException {
+ public <T> T decode(Reader reader, String keyProperty, Class<T> clazz) {
JsonElement jsonElement = GSON.fromJson(reader, JsonElement.class);
return new MyDecoder(jsonElement, keyProperty).decrypt(jsonElement, clazz);
}
@@ -67,7 +67,7 @@ public class PropertyCoder {
private static class MyDecoder extends StandardCoder {
private CryptoCoder crypto = null;
- MyDecoder(JsonElement jsonElement, String keyProperty) throws CoderException {
+ MyDecoder(JsonElement jsonElement, String keyProperty) {
if (!jsonElement.isJsonObject()) {
return;
}
diff --git a/utils/src/test/java/org/onap/policy/common/utils/coder/PropertyCoderTest.java b/utils/src/test/java/org/onap/policy/common/utils/coder/PropertyCoderTest.java
index 87617758..83017e70 100644
--- a/utils/src/test/java/org/onap/policy/common/utils/coder/PropertyCoderTest.java
+++ b/utils/src/test/java/org/onap/policy/common/utils/coder/PropertyCoderTest.java
@@ -59,7 +59,7 @@ public class PropertyCoderTest {
}
@Test
- public void testPropertyCoder() throws CoderException {
+ public void testPropertyCoder() {
MyClass data = propertyCoder.decode(json, AES_ENCRYPTION_KEY, MyClass.class);
assertEquals("alpha", data.getPdpRestPass());
assertEquals("hello", data.servers.get(0).pass);
@@ -69,7 +69,7 @@ public class PropertyCoderTest {
}
@Test
- public void testPropertyCoderReader() throws CoderException {
+ public void testPropertyCoderReader() {
Reader reader = new StringReader(json);
MyClass data = propertyCoder.decode(reader, AES_ENCRYPTION_KEY, MyClass.class);
assertEquals("alpha", data.getPdpRestPass());