Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConcurrentModificationException on org.openntf.domino.graph2.annotations.AbstractIncidenceHandler.removeEdges() #148

Closed
paulswithers opened this issue Jan 20, 2016 · 1 comment

Comments

@paulswithers
Copy link
Contributor

I don't think it's my implementation (though it might be), but I'm getting a java.util.ConcurrentModificationException on removeEdges(). I'm removing the Vertex at the other end of my current vertex, which is then trying to remove the edge. Here's the relevant part of the stack trace:

[err] java.util.ConcurrentModificationException
[err] at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
[err] at java.util.ArrayList$Itr.next(ArrayList.java:851)
[err] at org.openntf.domino.graph2.impl.DFastEdgeList$DFastEdgeIterator.next(DFastEdgeList.java:54)
[err] at org.openntf.domino.graph2.impl.DFastEdgeList$DFastEdgeIterator.next(DFastEdgeList.java:1)
[err] at org.openntf.domino.graph2.annotations.AbstractIncidenceHandler.removeEdges(AbstractIncidenceHandler.java:328)

removeEdges has this iterator code within it, and the error is on the first line:

    for (final Edge edge : element.getEdges(direction, label)) {
        if (null == otherVertex || edge.getVertex(direction.opposite()).equals(otherVertex)) {
            framedGraph.removeEdge(edge);
        }
    }

I think it's failing on checking for the next edge, because it's already removed the edge it's trying to get the "next" of - is that right?

@paulswithers
Copy link
Contributor Author

Adding this after line 505 of Graph2Demo also throws the same error:

            if (crew.getLastName().equals("Daniels")) {
                revengeMovie.removeStarring(crew);
            }

Tried changing it to use an iterator, but still fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant