Revision: 5609
http://squirrel-sql.svn.sourceforge.net/squirrel-sql/?rev=5609&view=rev
Author: manningr
Date: 2010-05-01 17:01:24 +0000 (Sat, 01 May 2010)
Log Message:
-----------
2992443: Cannot use RSyntax or Netbeans editors. Merged fix from trunk to 3.1.1 branch.
Modified Paths:
--------------
branches/squirrel-sql_3_1_1/sql12/app/src/net/sourceforge/squirrel_sql/client/session/schemainfo/SchemaInfoCache.java
Modified: branches/squirrel-sql_3_1_1/sql12/app/src/net/sourceforge/squirrel_sql/client/session/schemainfo/SchemaInfoCache.java
===================================================================
--- branches/squirrel-sql_3_1_1/sql12/app/src/net/sourceforge/squirrel_sql/client/session/schemainfo/SchemaInfoCache.java 2010-05-01 16:27:59 UTC (rev 5608)
+++ branches/squirrel-sql_3_1_1/sql12/app/src/net/sourceforge/squirrel_sql/client/session/schemainfo/SchemaInfoCache.java 2010-05-01 17:01:24 UTC (rev 5609)
@@ -25,9 +25,21 @@
import net.sourceforge.squirrel_sql.fw.util.log.ILogger;
import net.sourceforge.squirrel_sql.fw.util.log.LoggerController;
+/**
+ * This class is Serializable and yet doesn't declare serialVersionUID. This is done intentionally so that
+ * the SchemaInfoCacheSerializer can detect incompatible class changes (by catching Exception when attempting
+ * to read the serialized file). This was deemed to be a less error-prone way of handling changes to this
+ * class file's definition, then having to remember to consider whether or not serialVersionUID should be
+ * incremented for any given change. Therefore, it is very important to not introduce a serialVersionUID
+ * class member, as forgetting to update it might lead to undetected incompatible class changes that don't
+ * manifest themselves during de-serialization, but occur later in the application when missing members are
+ * invoked (for example). This more conservative approach can lead to the serialized file being removed upon
+ * installing a newer version of SQuirreL more often than necessary, but it seemed to us to be better than the
+ * alternative.
+ */
+@SuppressWarnings("serial")
public class SchemaInfoCache implements Serializable
{
- private static final long serialVersionUID = 2L;
private static final ILogger s_log =
LoggerController.createLogger(SchemaInfoCache.class);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|