File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
components/abstractions/src/main/java/com/microsoft/kiota Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -462,18 +462,20 @@ private static Object getSanitizedValues(Object value) {
462462 return null ;
463463 }
464464 if (value .getClass ().isArray ()) {
465- if (((Object []) value ).length > 0 ) {
466- if (((Object []) value )[0 ].getClass ().isArray ()) {
465+ final Object [] values = (Object []) value ;
466+
467+ if (values .length > 0 ) {
468+ if (values [0 ].getClass ().isArray ()) {
467469 throw new IllegalArgumentException ("multidimensional arrays are not supported" );
468470 }
469471
470472 final ArrayList <String > result = new ArrayList <>();
471- for (final Object item : ( Object []) value ) {
473+ for (final Object item : values ) {
472474 result .add (getSanitizedValues (item ).toString ());
473475 }
474476 return result ;
475477 }
476- return Arrays .asList (( Object []) value );
478+ return Arrays .asList (values );
477479 } else if (value instanceof ValuedEnum ) {
478480 return ((ValuedEnum ) value ).getValue ();
479481 } else if (value instanceof UUID ) {
You can’t perform that action at this time.
0 commit comments