Skip to content

Commit

Permalink
修改提示信息
Browse files Browse the repository at this point in the history
  • Loading branch information
昶乐 committed Feb 1, 2018
1 parent 1ef434c commit a759051
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion p3c-pmd/src/main/resources/messages.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<![CDATA[变量名【%s】不符合lowerCamelCase命名风格]]>
</entry>
<entry key="java.naming.PackageNamingRule.violation.msg">
<![CDATA[包名【%s】应全部小写]]>
<![CDATA[包名【%s】应全部为小写字母和数字组成]]>
</entry>
<entry key="java.naming.ServiceOrDaoClassShouldEndWithImplRule.violation.msg">
<![CDATA[类名【%s】应以Impl结尾]]>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,30 @@
<expected-problems>0</expected-problems>
<code-ref id="ArrayTypeStyleTest1" />
</test-code>

<code-fragment id="ArrayTypeStyleTest2">
<![CDATA[
public class ArrayTypeStyleTest{
public void ConfParse(String str){
TreeMap<String, String> mapConfKeyValue = new TreeMap<>();
String[] params = str.split("&");
for (String param : params) {
String fields[] = param.split("=");
if (fields.length != 2) {
continue;
}
String key = fields[0].trim();
String value = fields[1].trim();
mapConfKeyValue.put(key, value);
}
}
}
]]>
</code-fragment>
<test-code>
<description>array should be array[]</description>
<expected-problems>1</expected-problems>
<expected-linenumbers>6</expected-linenumbers>
<code-ref id="ArrayTypeStyleTest2" />
</test-code>
</test-data>

0 comments on commit a759051

Please sign in to comment.