File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
main/java/com/microsoft/graph/http
test/java/com/microsoft/graph/serializer Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ public String nextLink() {
5959 public final AdditionalDataManager additionalDataManager () {
6060 return additionalDataManager ;
6161 }
62- private final static String valueJsonKey = "value" ;
62+ private static final String VALUE_JSON_KEY = "value" ;
6363 /**
6464 * Sets the raw JSON object
6565 *
@@ -69,8 +69,8 @@ public final AdditionalDataManager additionalDataManager() {
6969 public void setRawObject (@ Nonnull final ISerializer serializer , @ Nonnull final JsonObject json ) {
7070 Objects .requireNonNull (serializer , "parameter serializer cannot be null" );
7171 Objects .requireNonNull (json , "parameter json cannot be null" );
72- if (json .has (valueJsonKey ) && value != null && value .size () > 0 ) {
73- final JsonArray array = json .getAsJsonArray (valueJsonKey );
72+ if (json .has (VALUE_JSON_KEY ) && value != null && ! value .isEmpty () ) {
73+ final JsonArray array = json .getAsJsonArray (VALUE_JSON_KEY );
7474 for (int i = 0 ; i < array .size () && i < value .size (); i ++) {
7575 final Object targetObject = value .get (i );
7676 if (targetObject instanceof IJsonBackedObject && array .get (i ).isJsonObject ()) {
Original file line number Diff line number Diff line change 88
99import org .junit .jupiter .api .Test ;
1010
11- public class CollectionResponseOfPrimitivesTests {
11+ class CollectionResponseOfPrimitivesTests {
1212 @ Test
1313 void DeserializesCollectionOfStrings () {
1414 final var serializer = new DefaultSerializer (mock (ILogger .class ));
You can’t perform that action at this time.
0 commit comments