@@ -35,9 +35,9 @@ public void testNoPatchReportPath() throws Exception {
3535 try {
3636 Main .main ();
3737 }
38- catch (IllegalArgumentException ex ) {
38+ catch (IllegalArgumentException exc ) {
3939 Assert .assertEquals ("obligatory argument --patchReportPath not present, -h for help" ,
40- ex .getMessage ());
40+ exc .getMessage ());
4141 }
4242 }
4343
@@ -46,8 +46,8 @@ public void testInvalidBaseReportPath() throws Exception {
4646 try {
4747 Main .main ("-baseReport" , "test" , "-patchReport" , VALID_BASE_REPORT_EMPTY );
4848 }
49- catch (IllegalArgumentException ex ) {
50- Assert .assertEquals ("Base XML Report file doesn't exist: test" , ex .getMessage ());
49+ catch (IllegalArgumentException exc ) {
50+ Assert .assertEquals ("Base XML Report file doesn't exist: test" , exc .getMessage ());
5151 }
5252 }
5353
@@ -56,8 +56,8 @@ public void testInvalidPatchReportPath() throws Exception {
5656 try {
5757 Main .main ("-baseReport" , VALID_BASE_REPORT_EMPTY , "-patchReport" , "test" );
5858 }
59- catch (IllegalArgumentException ex ) {
60- Assert .assertEquals ("Patch XML Report file doesn't exist: test" , ex .getMessage ());
59+ catch (IllegalArgumentException exc ) {
60+ Assert .assertEquals ("Patch XML Report file doesn't exist: test" , exc .getMessage ());
6161 }
6262 }
6363
@@ -67,9 +67,9 @@ public void testBatchPatchReportSamePath() throws Exception {
6767 Main .main ("-baseReport" , VALID_BASE_REPORT_EMPTY , "-patchReport" ,
6868 VALID_BASE_REPORT_EMPTY );
6969 }
70- catch (IllegalArgumentException ex ) {
70+ catch (IllegalArgumentException exc ) {
7171 Assert .assertEquals ("Both Base and Patch XML report files have the same path." ,
72- ex .getMessage ());
72+ exc .getMessage ());
7373 }
7474 }
7575
@@ -79,8 +79,8 @@ public void testInvalidOutputPath() throws Exception {
7979 Main .main ("-baseReport" , VALID_BASE_REPORT_EMPTY , "-patchReport" ,
8080 VALID_PATCH_REPORT_EMPTY , "-output" , "pom.xml" );
8181 }
82- catch (IllegalArgumentException ex ) {
83- Assert .assertEquals ("Output path is not a directory: pom.xml" , ex .getMessage ());
82+ catch (IllegalArgumentException exc ) {
83+ Assert .assertEquals ("Output path is not a directory: pom.xml" , exc .getMessage ());
8484 }
8585 }
8686
@@ -90,8 +90,8 @@ public void testInvalidRefFilesPath() throws Exception {
9090 Main .main ("-baseReport" , VALID_BASE_REPORT_EMPTY , "-patchReport" ,
9191 VALID_PATCH_REPORT_EMPTY , "-refFiles" , "pom.xml" );
9292 }
93- catch (IllegalArgumentException ex ) {
94- Assert .assertEquals ("Ref Files path is not a directory: pom.xml" , ex .getMessage ());
93+ catch (IllegalArgumentException exc ) {
94+ Assert .assertEquals ("Ref Files path is not a directory: pom.xml" , exc .getMessage ());
9595 }
9696 }
9797
@@ -101,10 +101,10 @@ public void testBaseConfigAlone() throws Exception {
101101 Main .main ("-baseReport" , VALID_BASE_REPORT_EMPTY , "-patchReport" ,
102102 VALID_PATCH_REPORT_EMPTY , "-baseConfig" , "test" );
103103 }
104- catch (IllegalArgumentException ex ) {
104+ catch (IllegalArgumentException exc ) {
105105 Assert .assertEquals (
106106 "Patch checkstyle configuration xml path is missing while base configuration"
107- + " path is present" , ex .getMessage ());
107+ + " path is present" , exc .getMessage ());
108108 }
109109 }
110110
@@ -114,10 +114,10 @@ public void testPatchConfigAlone() throws Exception {
114114 Main .main ("-baseReport" , VALID_BASE_REPORT_EMPTY , "-patchReport" ,
115115 VALID_PATCH_REPORT_EMPTY , "-patchConfig" , VALID_BASE_CONFIG );
116116 }
117- catch (IllegalArgumentException ex ) {
117+ catch (IllegalArgumentException exc ) {
118118 Assert .assertEquals (
119119 "Base checkstyle configuration xml path is missing while patch configuration"
120- + " path is present" , ex .getMessage ());
120+ + " path is present" , exc .getMessage ());
121121 }
122122 }
123123
@@ -128,9 +128,9 @@ public void testInvalidBaseConfig() throws Exception {
128128 VALID_PATCH_REPORT_EMPTY , "-baseConfig" , "test" , "-patchConfig" ,
129129 VALID_BASE_CONFIG );
130130 }
131- catch (IllegalArgumentException ex ) {
131+ catch (IllegalArgumentException exc ) {
132132 Assert .assertEquals ("Base checkstyle configuration xml file is missing: test" ,
133- ex .getMessage ());
133+ exc .getMessage ());
134134 }
135135 }
136136
@@ -141,9 +141,9 @@ public void testInvalidPatchConfig() throws Exception {
141141 VALID_PATCH_REPORT_EMPTY , "-baseConfig" , VALID_BASE_CONFIG , "-patchConfig" ,
142142 "test" );
143143 }
144- catch (IllegalArgumentException ex ) {
144+ catch (IllegalArgumentException exc ) {
145145 Assert .assertEquals ("Patch checkstyle configuration xml file is missing: test" ,
146- ex .getMessage ());
146+ exc .getMessage ());
147147 }
148148 }
149149
@@ -153,11 +153,11 @@ public void testBaseConfigWithoutBaseReport() throws Exception {
153153 Main .main ("-patchReport" , VALID_PATCH_REPORT_EMPTY , "-baseConfig" , VALID_BASE_CONFIG ,
154154 "-patchConfig" , VALID_BASE_CONFIG );
155155 }
156- catch (IllegalArgumentException ex ) {
156+ catch (IllegalArgumentException exc ) {
157157 Assert .assertEquals (
158158 "Base checkstyle configuration xml path is missing while base configuration "
159159 + "path is present." ,
160- ex .getMessage ());
160+ exc .getMessage ());
161161 }
162162 }
163163
@@ -167,9 +167,9 @@ public void testTextBaseConfigGiven() throws Exception {
167167 Main .main ("-compareMode" , "text" , "-patchReport" , VALID_PATCH_REPORT_EMPTY ,
168168 "-baseConfig" , "test" );
169169 }
170- catch (IllegalArgumentException ex ) {
170+ catch (IllegalArgumentException exc ) {
171171 Assert .assertEquals ("Checkstyle configuration xml paths do not need to be present for "
172- + "text mode." , ex .getMessage ());
172+ + "text mode." , exc .getMessage ());
173173 }
174174 }
175175
@@ -179,9 +179,9 @@ public void testTextPatchConfigGiven() throws Exception {
179179 Main .main ("-compareMode" , "text" , "-patchReport" , VALID_PATCH_REPORT_EMPTY ,
180180 "-patchConfig" , "test" );
181181 }
182- catch (IllegalArgumentException ex ) {
182+ catch (IllegalArgumentException exc ) {
183183 Assert .assertEquals ("Checkstyle configuration xml paths do not need to be present for "
184- + "text mode." , ex .getMessage ());
184+ + "text mode." , exc .getMessage ());
185185 }
186186 }
187187
@@ -190,8 +190,8 @@ public void testTextInvalidPatchReportPath() throws Exception {
190190 try {
191191 Main .main ("-compareMode" , "text" , "-patchReport" , "test" );
192192 }
193- catch (IllegalArgumentException ex ) {
194- Assert .assertEquals ("Patch Report directory doesn't exist: test" , ex .getMessage ());
193+ catch (IllegalArgumentException exc ) {
194+ Assert .assertEquals ("Patch Report directory doesn't exist: test" , exc .getMessage ());
195195 }
196196 }
197197
@@ -201,8 +201,8 @@ public void testTextInvalidBaseReportPath() throws Exception {
201201 Main .main ("-compareMode" , "text" , "-baseReport" , "test" , "-patchReport" ,
202202 VALID_PATCH_DIR );
203203 }
204- catch (IllegalArgumentException ex ) {
205- Assert .assertEquals ("Base Report directory doesn't exist: test" , ex .getMessage ());
204+ catch (IllegalArgumentException exc ) {
205+ Assert .assertEquals ("Base Report directory doesn't exist: test" , exc .getMessage ());
206206 }
207207 }
208208}
0 commit comments