From 7da3ddfa40de2f683a2d423d62b78a8d001108eb Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Fri, 27 Mar 2020 08:03:24 -0400 Subject: More sonar issues cleanup Either log or rethrow Use boolean expression Add at least one test Remove commented out code Issue-ID: POLICY-2204 Change-Id: I4fdf31aea75303e4f49d25198eb3b12341995bfe Signed-off-by: Pamela Dragosh --- .../policy/common/gson/internal/FieldDeserializerTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gson/src/test/java/org') diff --git a/gson/src/test/java/org/onap/policy/common/gson/internal/FieldDeserializerTest.java b/gson/src/test/java/org/onap/policy/common/gson/internal/FieldDeserializerTest.java index 509ddb79..acb241e6 100644 --- a/gson/src/test/java/org/onap/policy/common/gson/internal/FieldDeserializerTest.java +++ b/gson/src/test/java/org/onap/policy/common/gson/internal/FieldDeserializerTest.java @@ -1,8 +1,8 @@ -/* +/*- * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -61,18 +61,18 @@ public class FieldDeserializerTest { // no value in tree - text remains unchanged text = INITIAL_VALUE; deser.getFromTree(json, this); - assertEquals(text, INITIAL_VALUE); + assertEquals(INITIAL_VALUE, text); // null value in tree - text remains unchanged json.add(TEXT_FIELD_NAME, JsonNull.INSTANCE); deser.getFromTree(json, this); - assertEquals(text, INITIAL_VALUE); + assertEquals(INITIAL_VALUE, text); // now assign a value - text should be changed now json.addProperty(TEXT_FIELD_NAME, NEW_VALUE); deser.getFromTree(json, this); - assertEquals(text, NEW_VALUE); + assertEquals(NEW_VALUE, text); /* * check list field -- cgit 1.2.3-korg