[ https://issues.apache.org/jira/browse/SANDBOX-336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13059030#comment-13059030 ]
Simone Tripodi commented on SANDBOX-336: ---------------------------------------- Interesting, but that would make more sense if the commons-graph would have been focused only on our in-memory based implementation. Looks like this is more a Graph generation turnaround that an APIs improvement. I expect that in production environments people provide their {{Grap<V, E>}} implementation, adapting 3rd parties storages (GraphDB, KV-Storages, RDBMS...) so just providing a boolean flag of success/failure wouldn't be enough. If an error happens in the data layers below Graph APIs, just returning {{false}} is a practice I have been discouraging, induces {{Grap<V, E>}} implementors kind of lazy pattern: {code} public void MyMutableGraph { private MyGraphDBStorageInstance storage; ... public boolean addEdge( V head, E e, V tail ) { try { storage.doSomething( head, e, tail ); return true; } catch ( Throwable t ) { return false; } } ... } {code} OTOH, people could commit other mistakes - but I wouldn't offer them more chances to provide wrong implementations :P > [Graph] Duplicate Edge > ------------------------ > > Key: SANDBOX-336 > URL: https://issues.apache.org/jira/browse/SANDBOX-336 > Project: Commons Sandbox > Issue Type: Bug > Components: Graph > Reporter: Marco Speranza > Attachments: missingControllAlreadyExistEdge.patch > > > The method BaseMutableGraph#addEdge does not check if the edge already > exists. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira