Skip to content

Commit b0701f0

Browse files
ling-alan-huangbrianchandotcom
authored andcommitted
LPD-43079 SF
1 parent 18678eb commit b0701f0

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

modules/util/source-formatter/src/main/java/com/liferay/source/formatter/checkstyle/check/ModelSetCallWithCompanyIdCheck.java

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,13 @@ protected void doVisitToken(DetailAST detailAST) {
6060

6161
String methodName = getMethodName(parentDetailAST);
6262

63-
if (!methodName.startsWith("set") ||
64-
methodName.endsWith("CompanyId")) {
65-
66-
continue;
67-
}
68-
69-
if ((typeName.equals("com.liferay.portal.kernel.model.Group") &&
70-
methodName.equals("setClassPK")) ||
71-
(typeName.equals(
72-
"com.liferay.portal.kernel.model.ResourcePermission") &&
73-
methodName.equals("setPrimKey"))) {
63+
if (methodName.endsWith("CompanyId") ||
64+
!methodName.startsWith("set") ||
65+
(methodName.equals("setClassPK") &&
66+
typeName.equals("com.liferay.portal.kernel.model.Group")) ||
67+
(methodName.equals("setPrimKey") &&
68+
typeName.equals(
69+
"com.liferay.portal.kernel.model.ResourcePermission"))) {
7470

7571
continue;
7672
}

0 commit comments

Comments
 (0)