开发者

Serializable custom exception class?

Google App Engine requires me to make objects serializable before I can use it as a session bean. Now I have a Product class, I made this Product class serializable, but one of its const开发者_开发技巧ructors and some setters have checked exceptions, these checked exceptions are custom exceptions. My question is: should I serialize these custom exception classes?


If the Exceptions are not a field of your class, there is no need to make them serializable because they won´t be stored. By default Exception are serializable anyway

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜