I am getting the below exception while traversing on the Sorted list which is implemented using the `abstractObjectList` coming from the `fastUtils` library.
```none
Caused by: java.lang.IndexOutOfBoundsException: Index (0) is greater than list size (-1)
at it.unimi.dsi.fastutil.objects.AbstractObjectList.ensureIndex(AbstractObjectList.java:44) ~[fastutil-core-8.5.4.jar:?]
at it.unimi.dsi.fastutil.objects.ObjectArrayList.listIterator(ObjectArrayList.java:697) ~[fastutil-core-8.5.4.jar:?]
at it.unimi.dsi.fastutil.objects.AbstractObjectList.listIterator(AbstractObjectList.java:120) ~[fastutil-core-8.5.4.jar:?]
at it.unimi.dsi.fastutil.objects.AbstractObjectList.iterator(AbstractObjectList.java:112) ~[fastutil-core-8.5.4.jar:?]
at it.unimi.dsi.fastutil.objects.AbstractObjectList.iterator(AbstractObjectList.java:34) ~[fastutil-core-8.5.4.jar:?]
```
The list is getting traversed by multiple threads and one thread is creating new instances of the object of which the list is one field.
< /code>
Der tatsächliche Code geht ähnlich wie im folgenden, wo ich die Liste extrahiere, um jedes Element der Liste zu verarbeiten, ohne sie zu ändern. < /p>
private List[] twoValueList= {new SortedList(PRICE_DESC), new SortedList(PRICE_ASC)};
source = twoValueList[0];
private void add(List source, List target){
for(object1 obj: source) {
target.add( doSomeProcessesing(obj) );
}
}
[code]I am getting the below exception while traversing on the Sorted list which is implemented using the `abstractObjectList` coming from the `fastUtils` library. ```none Caused by: java.lang.IndexOutOfBoundsException: Index (0) is greater than list size (-1) at it.unimi.dsi.fastutil.objects.AbstractObjectList.ensureIndex(AbstractObjectList.java:44) ~[fastutil-core-8.5.4.jar:?] at it.unimi.dsi.fastutil.objects.ObjectArrayList.listIterator(ObjectArrayList.java:697) ~[fastutil-core-8.5.4.jar:?] at it.unimi.dsi.fastutil.objects.AbstractObjectList.listIterator(AbstractObjectList.java:120) ~[fastutil-core-8.5.4.jar:?] at it.unimi.dsi.fastutil.objects.AbstractObjectList.iterator(AbstractObjectList.java:112) ~[fastutil-core-8.5.4.jar:?] at it.unimi.dsi.fastutil.objects.AbstractObjectList.iterator(AbstractObjectList.java:34) ~[fastutil-core-8.5.4.jar:?] ``` The list is getting traversed by multiple threads and one thread is creating new instances of the object of which the list is one field. < /code> Der tatsächliche Code geht ähnlich wie im folgenden, wo ich die Liste extrahiere, um jedes Element der Liste zu verarbeiten, ohne sie zu ändern. < /p> private List[] twoValueList= {new SortedList(PRICE_DESC), new SortedList(PRICE_ASC)};
Ich erhalte die folgende Ausnahme, während ich auf der sortierten Liste durchquert wird, die mit der AbstractObjectList aus der Fastutils Bibliothek implementiert wird.
Caused by:...
Ich versuche, eine Währungserzieher -App mit einer API zu erstellen. Ich weiß, dass das Ausschüttungsanordnungsarray leer ist und ich kann nicht zu einem leeren Array greifen. Aber ich weiß nicht,...
Ich habe eine MySQL-Tabelle mit einem einspaltigen Index in der C1-Spalte. Ich muss es durch einen zusammengesetzten Index auf (C1, C2) ersetzen und dann den ursprünglichen Einspalt-Index fallen...
Ich habe einen Pandas DataFrame df . Es hat Multi-Index mit GX.region und Szenario_Model. Wenn ich es zeichne, kommt es in der gleichen Reihenfolge. Ich möchte es jedoch als PES, TES und DES ordnen...
Ich bin neu in Python und habe einige Probleme über die Übernahme von einem Spefcific -Index zu anderen. Ex: Ich fordere eine Eingabe des Namens von jedem Elternteil des Benutzers an und möchte nur...