-
Enhancement
-
Resolution: Fixed
-
P4
-
1.4.2
-
beta
-
x86
-
linux
Name: rmT116609 Date: 11/19/2003
FULL PRODUCT VERSION :
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
FULL OS VERSION :
Linux release.eventmonitor.com 2.4.18-3smp #1 SMP Thu Apr 18 06:59:55 EDT 2002 i686 unknown
Windows XP
A DESCRIPTION OF THE PROBLEM :
serialver exits on the first non-serializable class it encounters. That is, given
serialver java.lang.String java.util.Iterator java.awt.Button
It will print out
java.lang.String: static final long serialVersionUID = -6849794470754667710L;
Class java.util.Iterator is not Serializable.
No information is given about the following class(es). This makes it less helpful than it could be to find the serialvers of multiple classes because it means that I must first filter out the non-serializable classes.
For example, think of using this from a script that will go through a set of classes and insert serial version IDs into all the serializable classes. The script has no way of testing which are serializable because it isn't Java code. If serialver would give output for all classes, one call to serialver would get all the information needed. Otherwise the script needs to either execute serialver once for each class, or run serialver repeatedly, throwing out one non-serializable class at a time until it gets a successful run.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
(see description)
EXPECTED VERSUS ACTUAL BEHAVIOR :
For each class listed, either the serial version declaration line or a line saying "Class Foo is not Serializable." (or any other error message). The exit status of the application should only be zero if all classes are serializable.
(see description)
REPRODUCIBILITY :
This bug can be reproduced always.
(Incident Review ID: 182662)
======================================================================