@@ -65,13 +65,13 @@ public void testWithEmptyArgumentCount() throws Exception {
6565 verify (checkConfig , getPath ("InputForbidCertainMethodCheck.java" ));
6666 Assertions .fail ("Expecting CheckstyleException" );
6767 }
68- catch (CheckstyleException ex ) {
68+ catch (CheckstyleException exc ) {
6969 Assertions .assertEquals (
7070 "cannot initialize module com.puppycrawl.tools.checkstyle.TreeWalker - "
7171 + "cannot initialize module"
7272 + " com.github.sevntu.checkstyle.checks.coding.ForbidCertainMethodCheck -"
7373 + " Cannot set property 'argumentCount' to ''" ,
74- ex .getMessage (), "Exception did not have correct error message." );
74+ exc .getMessage (), "Exception did not have correct error message." );
7575 }
7676 }
7777
@@ -85,13 +85,13 @@ public void testWithSpacesForArgumentCount() throws Exception {
8585 verify (checkConfig , getPath ("InputForbidCertainMethodCheck.java" ));
8686 Assertions .fail ("Expecting CheckstyleException" );
8787 }
88- catch (CheckstyleException ex ) {
88+ catch (CheckstyleException exc ) {
8989 Assertions .assertEquals (
9090 "cannot initialize module com.puppycrawl.tools.checkstyle.TreeWalker - "
9191 + "cannot initialize module"
9292 + " com.github.sevntu.checkstyle.checks.coding.ForbidCertainMethodCheck -"
9393 + " Cannot set property 'argumentCount' to ' '" ,
94- ex .getMessage (), "Exception did not have correct error message." );
94+ exc .getMessage (), "Exception did not have correct error message." );
9595 }
9696 }
9797
@@ -105,13 +105,13 @@ public void testWithSpacesAndCommaForArgumentCount() throws Exception {
105105 verify (checkConfig , getPath ("InputForbidCertainMethodCheck.java" ));
106106 Assertions .fail ("Expecting CheckstyleException" );
107107 }
108- catch (CheckstyleException ex ) {
108+ catch (CheckstyleException exc ) {
109109 Assertions .assertEquals (
110110 "cannot initialize module com.puppycrawl.tools.checkstyle.TreeWalker - "
111111 + "cannot initialize module"
112112 + " com.github.sevntu.checkstyle.checks.coding.ForbidCertainMethodCheck -"
113113 + " Cannot set property 'argumentCount' to ' , '" ,
114- ex .getMessage (), "Exception did not have correct error message." );
114+ exc .getMessage (), "Exception did not have correct error message." );
115115 }
116116 }
117117
@@ -125,13 +125,13 @@ public void testWithNullArgumentCount() throws Exception {
125125 verify (checkConfig , getPath ("InputForbidCertainMethodCheck.java" ));
126126 Assertions .fail ("Expecting CheckstyleException" );
127127 }
128- catch (CheckstyleException ex ) {
128+ catch (CheckstyleException exc ) {
129129 Assertions .assertEquals (
130130 "cannot initialize module com.puppycrawl.tools.checkstyle.TreeWalker - "
131131 + "cannot initialize module"
132132 + " com.github.sevntu.checkstyle.checks.coding.ForbidCertainMethodCheck -"
133133 + " Cannot set property 'argumentCount' to 'null'" ,
134- ex .getMessage (), "Exception did not have correct error message." );
134+ exc .getMessage (), "Exception did not have correct error message." );
135135 }
136136 }
137137
@@ -158,9 +158,9 @@ public void testUnsupportedToken() {
158158 check .visitToken (sync );
159159 Assertions .fail ("Expecting IllegalArgumentException" );
160160 }
161- catch (IllegalArgumentException ex ) {
161+ catch (IllegalArgumentException exc ) {
162162 Assertions .assertEquals ("Found unsupported token: LITERAL_SYNCHRONIZED" ,
163- ex .getMessage ());
163+ exc .getMessage ());
164164 }
165165 }
166166
@@ -173,13 +173,13 @@ public void testNullMethodNameRegex() throws Exception {
173173 verify (checkConfig , getPath ("InputForbidCertainMethodCheck.java" ));
174174 Assertions .fail ("Expecting CheckstyleException" );
175175 }
176- catch (CheckstyleException ex ) {
176+ catch (CheckstyleException exc ) {
177177 Assertions .assertEquals (
178178 "cannot initialize module com.puppycrawl.tools.checkstyle.TreeWalker - "
179179 + "cannot initialize module"
180180 + " com.github.sevntu.checkstyle.checks.coding.ForbidCertainMethodCheck -"
181181 + " Cannot set property 'methodName' to 'null'" ,
182- ex .getMessage (), "Exception did not have correct error message." );
182+ exc .getMessage (), "Exception did not have correct error message." );
183183 }
184184 }
185185
@@ -200,13 +200,13 @@ public void testBadMethodNameRegex() throws Exception {
200200 verify (checkConfig , getPath ("InputForbidCertainMethodCheck.java" ));
201201 Assertions .fail ("Expecting CheckstyleException" );
202202 }
203- catch (CheckstyleException ex ) {
203+ catch (CheckstyleException exc ) {
204204 Assertions .assertEquals (
205205 "cannot initialize module com.puppycrawl.tools.checkstyle.TreeWalker - "
206206 + "cannot initialize module"
207207 + " com.github.sevntu.checkstyle.checks.coding.ForbidCertainMethodCheck -"
208208 + " Cannot set property 'methodName' to '[exit'" ,
209- ex .getMessage (), "Exception did not have correct error message." );
209+ exc .getMessage (), "Exception did not have correct error message." );
210210 }
211211 }
212212
@@ -222,13 +222,13 @@ public void testBadRangeForArgumentCount() throws Exception {
222222 verify (checkConfig , getPath ("InputForbidCertainMethodCheck.java" ), expected );
223223 Assertions .fail ("Expecting CheckstyleException" );
224224 }
225- catch (CheckstyleException ex ) {
225+ catch (CheckstyleException exc ) {
226226 Assertions .assertEquals (
227227 "cannot initialize module com.puppycrawl.tools.checkstyle.TreeWalker - "
228228 + "cannot initialize module"
229229 + " com.github.sevntu.checkstyle.checks.coding.ForbidCertainMethodCheck -"
230230 + " Cannot set property 'argumentCount' to 'badArgCount'" ,
231- ex .getMessage (), "Exception did not have correct error message." );
231+ exc .getMessage (), "Exception did not have correct error message." );
232232 }
233233 }
234234
@@ -244,13 +244,13 @@ public void testBadRange2ForArgumentCount() throws Exception {
244244 verify (checkConfig , getPath ("InputForbidCertainMethodCheck.java" ), expected );
245245 Assertions .fail ("Expecting CheckstyleException" );
246246 }
247- catch (CheckstyleException ex ) {
247+ catch (CheckstyleException exc ) {
248248 Assertions .assertEquals (
249249 "cannot initialize module com.puppycrawl.tools.checkstyle.TreeWalker - "
250250 + "cannot initialize module"
251251 + " com.github.sevntu.checkstyle.checks.coding.ForbidCertainMethodCheck -"
252252 + " Cannot set property 'argumentCount' to 'badStart-badEnd'" ,
253- ex .getMessage (), "Exception did not have correct error message." );
253+ exc .getMessage (), "Exception did not have correct error message." );
254254 }
255255 }
256256
@@ -266,13 +266,13 @@ public void testBadRange3ForArgumentCount() throws Exception {
266266 verify (checkConfig , getPath ("InputForbidCertainMethodCheck.java" ), expected );
267267 Assertions .fail ("Expecting CheckstyleException" );
268268 }
269- catch (CheckstyleException ex ) {
269+ catch (CheckstyleException exc ) {
270270 Assertions .assertEquals (
271271 "cannot initialize module com.puppycrawl.tools.checkstyle.TreeWalker - "
272272 + "cannot initialize module"
273273 + " com.github.sevntu.checkstyle.checks.coding.ForbidCertainMethodCheck -"
274274 + " Cannot set property 'argumentCount' to '2, badStart-badEnd'" ,
275- ex .getMessage (), "Exception did not have correct error message." );
275+ exc .getMessage (), "Exception did not have correct error message." );
276276 }
277277 }
278278
@@ -288,13 +288,13 @@ public void testBadRange4ForArgumentCount() throws Exception {
288288 verify (checkConfig , getPath ("InputForbidCertainMethodCheck.java" ), expected );
289289 Assertions .fail ("Expecting CheckstyleException" );
290290 }
291- catch (CheckstyleException ex ) {
291+ catch (CheckstyleException exc ) {
292292 Assertions .assertEquals (
293293 "cannot initialize module com.puppycrawl.tools.checkstyle.TreeWalker - "
294294 + "cannot initialize module"
295295 + " com.github.sevntu.checkstyle.checks.coding.ForbidCertainMethodCheck -"
296296 + " Cannot set property 'argumentCount' to ' , 1-4 '" ,
297- ex .getMessage (), "Exception did not have correct error message." );
297+ exc .getMessage (), "Exception did not have correct error message." );
298298 }
299299 }
300300
@@ -310,13 +310,13 @@ public void testUnboundedRangeForArgumentCount() throws Exception {
310310 verify (checkConfig , getPath ("InputForbidCertainMethodCheck.java" ), expected );
311311 Assertions .fail ("Expecting CheckstyleException" );
312312 }
313- catch (CheckstyleException ex ) {
313+ catch (CheckstyleException exc ) {
314314 Assertions .assertEquals (
315315 "cannot initialize module com.puppycrawl.tools.checkstyle.TreeWalker - "
316316 + "cannot initialize module"
317317 + " com.github.sevntu.checkstyle.checks.coding.ForbidCertainMethodCheck -"
318318 + " Cannot set property 'argumentCount' to ' - '" ,
319- ex .getMessage (), "Exception did not have correct error message." );
319+ exc .getMessage (), "Exception did not have correct error message." );
320320 }
321321 }
322322
@@ -332,13 +332,13 @@ public void testRangeWithBadBoundsForArgumentCount() throws Exception {
332332 verify (checkConfig , getPath ("InputForbidCertainMethodCheck.java" ), expected );
333333 Assertions .fail ("Expecting CheckstyleException" );
334334 }
335- catch (CheckstyleException ex ) {
335+ catch (CheckstyleException exc ) {
336336 Assertions .assertEquals (
337337 "cannot initialize module com.puppycrawl.tools.checkstyle.TreeWalker - "
338338 + "cannot initialize module"
339339 + " com.github.sevntu.checkstyle.checks.coding.ForbidCertainMethodCheck -"
340340 + " Cannot set property 'argumentCount' to '10-1'" ,
341- ex .getMessage (), "Exception did not have correct error message." );
341+ exc .getMessage (), "Exception did not have correct error message." );
342342 }
343343 }
344344
0 commit comments