
Java
iteye_2327
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Item 61: Throw exceptions appropriate to the abstraction
Higher layers should catch lower-level exceptions and, in their place, throw exceptions that can be explained in terms of the higher-level abstraction.原创 2012-09-28 21:27:49 · 131 阅读 · 0 评论 -
Prefer executors and tasks to threads
By using executor service, you can: 1. wait for a particular task to complete 2. wait for any or all of a collection of tasks to complete 3. wait for executor service's graceful termination to comp...原创 2012-09-30 15:52:24 · 121 阅读 · 0 评论 -
Consider using a custom serialized form
Generally speaking, you should accept the default serialized form only if it is largely identical to the encoding that you would choose if you were designing a custom serialized form The default se...原创 2012-10-02 14:00:49 · 103 阅读 · 0 评论 -
Write readObject methods defensively
The problem is that the readObject method is effectively another public constructor, and it demands all of the same care as any other constructor. Just as a constructor must check its arguments for va...原创 2012-10-02 14:59:48 · 133 阅读 · 0 评论 -
Consider serialization proxies instead of serialized instances
The serialization proxy pattern is reasonably straightforward. First design a private static nested class of the serializable class. This nested class, known as the serialization proxy, should have a ...原创 2012-10-02 16:32:13 · 132 阅读 · 0 评论