This is an interesting question to come to the point: I do not know.
SUID is part of the open API. After publishing an API that is used outside your control, like the JDK, you cannot change this number without breaking the compatibility.
Therefore, I do not see any advantage of using a number, for example, 32432544354343L instead of 1L.
But for internal development, I see a slight advantage starting with a number like 1L:
Suppose we have 3 banks of an RMI client-server application:
- client.jar
- server.jar
- api.jar
In api.jar there are such business classes as Song, Album, ... used by client and server, serialization.
Now we start with SUID 1L for some of these classes and after release we change the internal format of one of these classes, so we increase SUID to 2L.
Client and server components should now include the new api.jar. If we make a mistake and forget to update either the client or the server with the new api.jar dependency, there will be an exception during deserialization. The message in the exception will include incompatible SUIDs.
So, here the numbers 1L and 2L are in the message. 2L> 1L, so we know that the component uses the old api.jar. With the generated IDE numbers like 123434534553L and 654642646363L, we donβt know which component uses the old api.jar.
But on the other hand, even newer JDK classes like LocalDate use numbers like 123434534553L instead of a simpler one. There seems to be a mixture in apache commons-lang, like FastDateParser.java uses a simple 3L.
https://github.com/apache/commons-lang/blob/master/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
Strange ...