Skip to content

Commit 8e31d64

Browse files
nrmancusoromani
authored andcommitted
pull #876: replace usage of CheckUtil#createFullType with FullIdent#createFullIdent
1 parent 97623a0 commit 8e31d64

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

sevntu-checks/src/main/java/com/github/sevntu/checkstyle/checks/coding/AvoidNotShortCircuitOperatorsForBooleanCheck.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import com.puppycrawl.tools.checkstyle.api.DetailAST;
2828
import com.puppycrawl.tools.checkstyle.api.FullIdent;
2929
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
30-
import com.puppycrawl.tools.checkstyle.utils.CheckUtil;
3130

3231
/**
3332
* This check limits using of not short-circuit operators
@@ -143,7 +142,7 @@ public final void visitToken(final DetailAST detailAST) {
143142
*/
144143
private static boolean isBooleanType(final DetailAST node) {
145144
final FullIdent methodOrVariableType =
146-
CheckUtil.createFullType(node.findFirstToken(TokenTypes.TYPE));
145+
FullIdent.createFullIdent(node.findFirstToken(TokenTypes.TYPE).getFirstChild());
147146
return BOOLEAN_TYPE_PATTERN
148147
.matcher(methodOrVariableType.getText())
149148
.find();

sevntu-checks/src/main/java/com/github/sevntu/checkstyle/checks/coding/IllegalCatchExtendedCheck.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import com.puppycrawl.tools.checkstyle.api.DetailAST;
2828
import com.puppycrawl.tools.checkstyle.api.FullIdent;
2929
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
30-
import com.puppycrawl.tools.checkstyle.utils.CheckUtil;
3130

3231
/**
3332
* Catching java.lang.Exception, java.lang.Error or java.lang.RuntimeException
@@ -142,7 +141,7 @@ public void visitToken(DetailAST detailAST) {
142141
|| allowRethrow && secondLvlChild.getType() == TokenTypes.LITERAL_NEW);
143142

144143
final DetailAST excType = paramDef.findFirstToken(TokenTypes.TYPE);
145-
final FullIdent ident = CheckUtil.createFullType(excType);
144+
final FullIdent ident = FullIdent.createFullIdent(excType.getFirstChild());
146145

147146
if (!noWarning && isIllegalClassName(ident.getText())) {
148147
log(detailAST, MSG_KEY, ident.getText());

0 commit comments

Comments
 (0)