fix serializable has serial version uid test

This commit is contained in:
Bas Leijdekkers
2010-09-23 11:14:03 +02:00
parent 28b74dc31a
commit 5d0de6c9ef
3 changed files with 11 additions and 3 deletions
@@ -1,7 +1,7 @@
<html>
<body><table> <tr> <td valign="top" height="150">
<font face="verdana" size="-1">
This inspection reports any instances of <b><font color="#000080">Serializable</font></b> classes which do not provide a <b><font color="#000080">serialVersionUID</font></b> field.
This inspection reports any <b><font color="#000080">Serializable</font></b> classes which do not provide a <b><font color="#000080">serialVersionUID</font></b> field.
Without a <b><font color="#000080">serialVersionUID</font></b> field, any change to a class will make previously serialized versions unreadable.
<p>
Use the table below to specify what specific classes and inheritors should be excluded
@@ -5,7 +5,7 @@ import java.io.Serializable;
public class SerializableHasSerialVersionUIDField<T extends Serializable> implements Serializable {
public abstract class DoNotWarnOnMe implements Serializable { }
public abstract class DoWarnOnMe implements Serializable { }
public interface X extends Serializable {}
}
@@ -1,10 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>SerializableHasSerialVersionUIDField.java</file>
<line>5</line>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Serializable class without 'serialVersionUID'</problem_class>
<description>&lt;code&gt;SerializableHasSerialVersionUIDField&lt;/code&gt; does not define a 'serialVersionUID' field #loc</description>
</problem>
<problem>
<file>SerializableHasSerialVersionUIDField.java</file>
<line>8</line>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Serializable class without 'serialVersionUID'</problem_class>
<description>&lt;code&gt;DoNotWarnOnMe&lt;/code&gt; does not define a 'serialVersionUID' field #loc</description>
</problem>
</problems>