When I attempt to serialize an instance of JGraph constructed using a JGraphModelAdapter I get a java.io.NotSerializableException: Looking at the source code I see:...java.io.NotSerializableException: org.jgrapht.ext.JGraphModelAdapter$ShieldedGraph private class ShieldedGraph { private final Graph<V, E> graph; ShieldedGraph(Graph<V, E> graph) { this.graph = graph; } ... } That is, the inner class ShieldedGraph does not implement Serializable. I can report this as a bug or change the source code, except I'm wondering if I'm missing something (the "right" way to serialize a JGraph) since otherwise this seems like a pretty obvious bug that would have been caught long ago. So, before I report this as a bug, etc., can anyone advise me on what would be the best way to proceed? Thank you, Matt ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ jgrapht-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/jgrapht-users |
Administrator
|
Probably no one tested serialization after adding ShieldedGraph. Go
ahead and create a bug (and ideally submit a pull request). Thanks! JVS On Wed, Jun 12, 2013 at 4:25 PM, Matt Futterman <[hidden email]> wrote: > When I attempt to serialize an instance of JGraph constructed using a > JGraphModelAdapter I get a java.io.NotSerializableException: > ...java.io.NotSerializableException: > org.jgrapht.ext.JGraphModelAdapter$ShieldedGraph > > Looking at the source code I see: > > private class ShieldedGraph > { > private final Graph<V, E> graph; > > ShieldedGraph(Graph<V, E> graph) > { > this.graph = graph; > } > ... > } > > That is, the inner class ShieldedGraph does not implement Serializable. I > can report this as a bug or change the source code, except I'm wondering if > I'm missing something (the "right" way to serialize a JGraph) since > otherwise this seems like a pretty obvious bug that would have been caught > long ago. So, before I report this as a bug, etc., can anyone advise me on > what would be the best way to proceed? > > Thank you, > Matt > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > jgrapht-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/jgrapht-users > ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ jgrapht-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/jgrapht-users |
Free forum by Nabble | Edit this page |