File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
jnosql-arangodb/src/main/java/org/eclipse/jnosql/databases/arangodb/communication Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -48,11 +48,6 @@ public final class ArangoDBUtil {
4848 public static final String KEY = "_key" ;
4949 public static final String ID = "_id" ;
5050 public static final String REV = "_rev" ;
51-
52- private static final Function <Object , String > KEY_DOCUMENT = d -> cast (d ).name ();
53- private static final Function <Object , Object > VALUE_DOCUMENT = d -> ValueUtil .convert (cast (d ).value ());
54-
55-
5651 private static final Logger LOGGER = Logger .getLogger (ArangoDBUtil .class .getName ());
5752
5853 private static final Function <Map .Entry <?, ?>, Document > ENTRY_DOCUMENT = entry ->
@@ -150,8 +145,13 @@ private static Object convert(Value value) {
150145 }
151146
152147 private static Object getMap (Object val ) {
153- return StreamSupport .stream (Iterable .class .cast (val ).spliterator (), false )
154- .collect (toMap (KEY_DOCUMENT , VALUE_DOCUMENT ));
148+ Iterable <?> iterable = Iterable .class .cast (val );
149+ Map <Object , Object > map = new HashMap <>();
150+ for (Object item : iterable ) {
151+ var document = cast (item );
152+ map .put (document .name (), document .value ());
153+ }
154+ return map ;
155155 }
156156
157157 private static boolean isSudDocumentList (Object value ) {
You can’t perform that action at this time.
0 commit comments