@@ -116,14 +116,10 @@ public class RunCommand implements ICommand {
116
116
private ReporterFactory reporterFactory ;
117
117
private ReporterManager reporterManager ;
118
118
119
- public ConnectionInfo getConnectionInfo () {
119
+ private ConnectionInfo getConnectionInfo () {
120
120
return connectionInfoList .get (0 );
121
121
}
122
122
123
- public List <String > getTestPaths () {
124
- return testPaths ;
125
- }
126
-
127
123
void init () {
128
124
129
125
LoggerConfiguration .ConfigLevel level = LoggerConfiguration .ConfigLevel .BASIC ;
@@ -144,7 +140,6 @@ public int run() {
144
140
try {
145
141
146
142
final List <Reporter > reporterList ;
147
- final List <String > testPaths = getTestPaths ();
148
143
149
144
final File baseDir = new File ("" ).getAbsoluteFile ();
150
145
final FileMapperOptions [] sourceMappingOptions = {null };
@@ -155,23 +150,8 @@ public int run() {
155
150
sourceMappingOptions [0 ] = getFileMapperOptionsByParamListItem (this .sourcePathParams , baseDir );
156
151
testMappingOptions [0 ] = getFileMapperOptionsByParamListItem (this .testPathParams , baseDir );
157
152
158
- ArrayList <String > includeObjectsList ;
159
- ArrayList <String > excludeObjectsList ;
160
-
161
- if (includeObjects != null && !includeObjects .isEmpty ()) {
162
- includeObjectsList = new ArrayList <>(Arrays .asList (includeObjects .split ("," )));
163
- } else {
164
- includeObjectsList = new ArrayList <>();
165
- }
166
-
167
- if (excludeObjects != null && !excludeObjects .isEmpty ()) {
168
- excludeObjectsList = new ArrayList <>(Arrays .asList (excludeObjects .split ("," )));
169
- } else {
170
- excludeObjectsList = new ArrayList <>();
171
- }
172
-
173
- final ArrayList <String > finalIncludeObjectsList = includeObjectsList ;
174
- final ArrayList <String > finalExcludeObjectsList = excludeObjectsList ;
153
+ final List <String > finalIncludeObjectsList = getObjectList (includeObjects );
154
+ final List <String > finalExcludeObjectsList = getObjectList (excludeObjects );
175
155
176
156
final DataSource dataSource = DataSourceProvider .getDataSource (getConnectionInfo (), getReporterManager ().getNumberOfReporters () + 1 );
177
157
@@ -231,6 +211,16 @@ public int run() {
231
211
return 1 ;
232
212
}
233
213
214
+ private ArrayList <String > getObjectList (String includeObjects ) {
215
+ ArrayList <String > includeObjectsList ;
216
+ if (includeObjects != null && !includeObjects .isEmpty ()) {
217
+ includeObjectsList = new ArrayList <>(Arrays .asList (includeObjects .split ("," )));
218
+ } else {
219
+ includeObjectsList = new ArrayList <>();
220
+ }
221
+ return includeObjectsList ;
222
+ }
223
+
234
224
@ Override
235
225
public String getCommand () {
236
226
return "run" ;
@@ -239,7 +229,7 @@ public String getCommand() {
239
229
240
230
private void outputMainInformation () {
241
231
242
- StringBlockFormatter formatter = new StringBlockFormatter ("utPLCSL cli" );
232
+ StringBlockFormatter formatter = new StringBlockFormatter ("utPLSQL cli" );
243
233
formatter .appendLine (CliVersionInfo .getInfo ());
244
234
formatter .appendLine (JavaApiVersionInfo .getInfo ());
245
235
formatter .appendLine ("Java-Version: " + System .getProperty ("java.version" ));
@@ -317,7 +307,7 @@ private CompatibilityProxy checkFrameworkCompatibility(Connection conn) throws S
317
307
return proxy ;
318
308
}
319
309
320
- public FileMapperOptions getMapperOptions (List <String > mappingParams , List <String > filePaths ) {
310
+ private FileMapperOptions getMapperOptions (List <String > mappingParams , List <String > filePaths ) {
321
311
FileMapperOptions mapperOptions = new FileMapperOptions (filePaths );
322
312
323
313
final String OPT_OWNER ="-owner=" ;
@@ -364,25 +354,14 @@ public FileMapperOptions getMapperOptions(List<String> mappingParams, List<Strin
364
354
return mapperOptions ;
365
355
}
366
356
367
- /** Returns the version of the database framework if available
368
- *
369
- * @return
370
- */
371
- public Version getDatabaseVersion () {
372
- if ( compatibilityProxy != null )
373
- return compatibilityProxy .getDatabaseVersion ();
374
-
375
- return null ;
376
- }
377
-
378
357
private ReporterManager getReporterManager () {
379
358
if ( reporterManager == null )
380
359
reporterManager = new ReporterManager (reporterParams );
381
360
382
361
return reporterManager ;
383
362
}
384
363
385
- public List <ReporterOptions > getReporterOptionsList () {
364
+ List <ReporterOptions > getReporterOptionsList () {
386
365
return getReporterManager ().getReporterOptionsList ();
387
366
}
388
367
}
0 commit comments