code format

https://github.com/alibaba/p3c/issues/107
This commit is contained in:
骏烈
2017-10-24 09:48:22 +08:00
parent 1ade912a4e
commit 40eaededd1
10 changed files with 253 additions and 253 deletions

View File

@@ -204,7 +204,7 @@ Positive example:
// please refer to the pseudo-code as follows // please refer to the pseudo-code as follows
boolean existed = (file.open(fileName, "w") != null) && (...) || (...); boolean existed = (file.open(fileName, "w") != null) && (...) || (...);
if (existed) { if (existed) {
... //...
} }
``` ```
@@ -212,7 +212,7 @@ Positive example:
```java ```java
if ((file.open(fileName, "w") != null) && (...) || (...)) { if ((file.open(fileName, "w") != null) && (...) || (...)) {
... // ...
} }
``` ```

View File

@@ -41,6 +41,7 @@ public class NodeUtils {
/** /**
* TODO optimize * TODO optimize
*
* @param expression expression * @param expression expression
* @return true if wrapper type * @return true if wrapper type
*/ */

View File

@@ -42,7 +42,7 @@
<![CDATA[ <![CDATA[
Positive example: Positive example:
String KEY_PRE = "Id#taobao_1"; String KEY_PRE = "Id#taobao_1";
if(key.equals(KEY_PRE)){ if (KEY_PRE.equals(key)) {
//... //...
} }
]]> ]]>

View File

@@ -49,7 +49,7 @@
<![CDATA[ <![CDATA[
Negative example: Negative example:
if ((file.open(fileName, "w") != null) && (...) || (...)) { if ((file.open(fileName, "w") != null) && (...) || (...)) {
... // ...
} }
]]> ]]>
</example> </example>
@@ -58,7 +58,7 @@ Negative example:
Positive example: Positive example:
boolean existed = (file.open(fileName, "w") != null) && (...) || (...); boolean existed = (file.open(fileName, "w") != null) && (...) || (...);
if (existed) { if (existed) {
... //...
} }
]]> ]]>
</example> </example>

View File

@@ -34,7 +34,7 @@
Integer a = 235; Integer a = 235;
Integer b = 235; Integer b = 235;
if (a.equals(b)) { if (a.equals(b)) {
//相等 // code
} }
]]> ]]>
</example> </example>
@@ -112,7 +112,7 @@
<example> <example>
<![CDATA[ <![CDATA[
反例: Negative example:
String result; String result;
for (String string : tagNameList) { for (String string : tagNameList) {
result = result + string; result = result + string;
@@ -121,7 +121,7 @@
</example> </example>
<example> <example>
<![CDATA[ <![CDATA[
正例: Positive example:
StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder = new StringBuilder();
for (String string : tagNameList) { for (String string : tagNameList) {
stringBuilder.append(string); stringBuilder.append(string);

View File

@@ -104,7 +104,6 @@ Negative example:
if (delCondition) { if (delCondition) {
it.remove(); it.remove();
} }
} }
]]> ]]>
</example> </example>