[Plexus-svn] SF.net SVN: plexus:[849] trunk/plexus/src/main/java/com/phoenixst/plexus/ DefaultGraph
Status: Alpha
Brought to you by:
rconner
|
From: <rc...@us...> - 2010-01-24 21:15:41
|
Revision: 849
http://plexus.svn.sourceforge.net/plexus/?rev=849&view=rev
Author: rconner
Date: 2010-01-24 21:15:32 +0000 (Sun, 24 Jan 2010)
Log Message:
-----------
Fix DefaultGraph deserialization. Unfortunately, a field can't be transient and final in a serializable class, at least not one deserialized in the way DefaultGraph is right now.
Modified Paths:
--------------
trunk/plexus/src/main/java/com/phoenixst/plexus/DefaultGraph.java
Modified: trunk/plexus/src/main/java/com/phoenixst/plexus/DefaultGraph.java
===================================================================
--- trunk/plexus/src/main/java/com/phoenixst/plexus/DefaultGraph.java 2010-01-24 20:02:33 UTC (rev 848)
+++ trunk/plexus/src/main/java/com/phoenixst/plexus/DefaultGraph.java 2010-01-24 21:15:32 UTC (rev 849)
@@ -194,12 +194,12 @@
/**
* A lazy collection of all the nodes backed by the nodeMap.
*/
- private transient final Collection nodeCollection = new AllNodesCollection();
+ private transient Collection nodeCollection = new AllNodesCollection();
/**
* A lazy collection of all the edges backed by the nodeMap.
*/
- private transient final Collection edgeCollection = new AllEdgesCollection();
+ private transient Collection edgeCollection = new AllEdgesCollection();
/**
* The delegate to handle observable functionality.
@@ -209,12 +209,12 @@
/**
* A String representing this instance for logging purposes.
*/
- transient final String instanceString = "(" + System.identityHashCode( this ) + ")";
+ transient String instanceString = "(" + System.identityHashCode( this ) + ")";
/**
* The reapable collection of currently iterating cursors.
*/
- transient final Collection cursors = new ReapableCollection();
+ transient Collection cursors = new ReapableCollection();
////////////////////////////////////////
@@ -296,6 +296,11 @@
in.defaultReadObject();
observableDelegate = new ObservableGraphDelegate( this, EVENT_LOGGER );
+ nodeCollection = new AllNodesCollection();
+ edgeCollection = new AllEdgesCollection();
+ instanceString = "(" + System.identityHashCode( this ) + ")";
+ cursors = new ReapableCollection();
+
int nodeSize = in.readInt();
if( nodeSize < 0 ) {
throw new InvalidObjectException( "Node size is less than 0: " + nodeSize );
@@ -346,6 +351,13 @@
}
+ private void readObjectNoData()
+ throws InvalidObjectException
+ {
+ throw new InvalidObjectException( "Stream data required" );
+ }
+
+
////////////////////////////////////////
// Protected Graph.Edge creation method - which can be overridden
// by subclasses.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|