This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 3e736ea9c92 Update Code of Conduct about Java Stream (#19603)
3e736ea9c92 is described below
commit 3e736ea9c92dd5595fb21acaa0693ce43b17619b
Author: 吴伟杰 <[email protected]>
AuthorDate: Wed Jul 27 17:22:34 2022 +0800
Update Code of Conduct about Java Stream (#19603)
---
docs/community/content/contribute/code-conduct.cn.md | 1 +
docs/community/content/contribute/code-conduct.en.md | 1 +
2 files changed, 2 insertions(+)
diff --git a/docs/community/content/contribute/code-conduct.cn.md
b/docs/community/content/contribute/code-conduct.cn.md
index c9ed39ffe18..f4479bca238 100644
--- a/docs/community/content/contribute/code-conduct.cn.md
+++ b/docs/community/content/contribute/code-conduct.cn.md
@@ -51,6 +51,7 @@ chapter = true
- 注释只能包含 javadoc,todo 和 fixme。
- 公开的类和方法必须有 javadoc,其他类和方法以及覆盖自父类的方法无需 javadoc。
- 条件运算符(<表达式1> ? <表达式2> : <表达式3>)禁止 `嵌套使用`。
+ - 热点方法内应避免使用 Java Stream,除非该场景下使用 Stream 的性能优于普通循环。
## 单元测试规范
diff --git a/docs/community/content/contribute/code-conduct.en.md
b/docs/community/content/contribute/code-conduct.en.md
index e5b4c879d4d..cd38920ac6f 100644
--- a/docs/community/content/contribute/code-conduct.en.md
+++ b/docs/community/content/contribute/code-conduct.en.md
@@ -48,6 +48,7 @@ The following code of conduct is based on full compliance
with [ASF CODE OF COND
- Include Javadoc, todo and fixme only in the comments.
- Only `public` classes and methods need javadoc, other methods, classes and
override methods do not need javadoc.
- conditional operator(<expression1> ? <expression2> : <expression3>) `nested
use` is forbidden.
+ - Avoid using Java Stream in hot methods, unless the performance of using
Stream is better than using loop in that situation.
## Contributor Covenant Unit Test of Conduct