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

Inconsistent Documentation in org.jgrapht.traverse.CrossComponentIterator #1223

Open
syoon2 opened this issue Apr 18, 2024 · 0 comments · May be fixed by #1224
Open

Inconsistent Documentation in org.jgrapht.traverse.CrossComponentIterator #1223

syoon2 opened this issue Apr 18, 2024 · 0 comments · May be fixed by #1224

Comments

@syoon2
Copy link

syoon2 commented Apr 18, 2024

/**
* Creates a new iterator for the specified graph. Iteration will start at the specified start
* vertex. If the specified start vertex is {@code null},
* Iteration will start at an arbitrary graph vertex.
*
* @param g the graph to be iterated.
* @param startVertex the vertex iteration to be started.
*
* @throws IllegalArgumentException if {@code g==null} or does not contain
* {@code startVertex}
*/
public CrossComponentIterator(Graph<V, E> g, V startVertex)

public CrossComponentIterator(Graph<V, E> g, Iterable<V> startVertices)
{
super(g);

public AbstractGraphIterator(Graph<V, E> graph)
{
this.graph = Objects.requireNonNull(graph, "graph must not be null");

The Javadoc for CrossComponentIterator states that an IllegalArgumentException is thrown if g == null. This is inconsistent with the superclass behavior as the super constructor directly throws NullPointerException.

syoon2 added a commit to syoon2/jgrapht that referenced this issue Apr 18, 2024
@syoon2 syoon2 linked a pull request Apr 20, 2024 that will close this issue
7 tasks
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

Successfully merging a pull request may close this issue.

1 participant