SerializationIdiom ignores all Throwables.

View: New views
1 Messages — Rating Filter:   Alert me  

SerializationIdiom ignores all Throwables.

by Roman Scheiter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi,

 

I am using findbugs to identify concerns in our Serialization code. One of the interesting checks for me is to ensure that the serialVersionUID is defined for all serializable classes.

It seems that findbugs and javac with lint:serial analysis enabled do not identify the same number of issues. The difference seems to be that lint:serial does not ignore all Throwable objects, but limits it to classes extending RuntimeException.
Looking at the code, it seems that the behavior is not configurable to control the types of classes to ignore for the serialVersionUID check. Would it be possible to add this option into a future version of findbugs, or is there a way to control this behavior today?

 

I also noticed that the priority for the serialVersionUID concerns is determined based on certain probabilistic properties. I would like to be able to set the priority of this particular check to high for all occurrences. One possible solution would be to perform a post processing action against the generated xml file and reset the priority for all of these issues to high. However, I was wondering whether findbugs already provides for that through configuration.

 

Any help in these two issues would be greatly appreciated.

Thanks,

Roman

 


_______________________________________________
Findbugs-discuss mailing list
Findbugs-discuss@...
https://mailman.cs.umd.edu/mailman/listinfo/findbugs-discuss