上面的解决方案明显违反了 [**SMART 类别设计**](//howtodoinjava.com/best-practices/5-class-design-principles-solid-in-java/"SMART principles for class design")中提到的**打开/关闭原则**。
上面的解决方案明显违反了 [**SMART 类别设计**](//howtodoinjava.com/best-practices/5-class-design-principles-solid-in-java/"SMART principles for class design")中提到的**开闭原则**。
@@ -28,37 +28,37 @@ Robert C. Martin 在他的书《 *敏捷软件开发:原理,模式和实践
#### 2.1 例外情况
请注意,在**的情况下,几乎绝对需要修改代码**并且无法避免。
请注意,在少数情况下,绝对有必要修改代码,并且无法避免。
*One such example is existing defects in the module. In case of fixing the defects, module code changes are allowed and their respective testcases as well.
*Another permissive exception is that any change to existing code is allowed as long as it does not also require a change to any client of that code. This allows the upgrade of the module versions with new language features. For example, [Spring 5](https://howtodoinjava.com/spring-5-tutorial/) supports and uses [Java8 lambda](https://howtodoinjava.com/java-8-tutorial/) syntax but to use it, we do not require to change our client application code.
对象序列化后,其类中的更改会破坏反序列化过程。 要确定您的班级中将来的变化,这些变化将是兼容的,而其他变化将被证明是不兼容的,请在此处 阅读完整的 [**指南。 简而言之,我在这里列出:**](//howtodoinjava.com/java/serialization/a-mini-guide-for-implementing-serializable-interface-in-java/"A mini guide for implementing serializable interface in java")
对象序列化后,其类中的更改会破坏反序列化过程。 要确定您的类中将来的变化,这些变化将是兼容的,而其他变化将被证明是不兼容的,请在此处 阅读完整的 [**指南。 简而言之,我在这里列出:**](//howtodoinjava.com/java/serialization/a-mini-guide-for-implementing-serializable-interface-in-java/"A mini guide for implementing serializable interface in java")