@@ -121,14 +121,10 @@ public class RunCommand implements ICommand {
121121 private ReporterFactory reporterFactory ;
122122 private ReporterManager reporterManager ;
123123
124- public ConnectionInfo getConnectionInfo () {
124+ private ConnectionInfo getConnectionInfo () {
125125 return connectionInfoList .get (0 );
126126 }
127127
128- public List <String > getTestPaths () {
129- return testPaths ;
130- }
131-
132128 void init () {
133129
134130 LoggerConfiguration .ConfigLevel level = LoggerConfiguration .ConfigLevel .BASIC ;
@@ -149,7 +145,6 @@ public int run() {
149145 try {
150146
151147 final List <Reporter > reporterList ;
152- final List <String > testPaths = getTestPaths ();
153148
154149 final File baseDir = new File ("" ).getAbsoluteFile ();
155150 final FileMapperOptions [] sourceMappingOptions = {null };
@@ -160,23 +155,8 @@ public int run() {
160155 sourceMappingOptions [0 ] = getFileMapperOptionsByParamListItem (this .sourcePathParams , baseDir );
161156 testMappingOptions [0 ] = getFileMapperOptionsByParamListItem (this .testPathParams , baseDir );
162157
163- ArrayList <String > includeObjectsList ;
164- ArrayList <String > excludeObjectsList ;
165-
166- if (includeObjects != null && !includeObjects .isEmpty ()) {
167- includeObjectsList = new ArrayList <>(Arrays .asList (includeObjects .split ("," )));
168- } else {
169- includeObjectsList = new ArrayList <>();
170- }
171-
172- if (excludeObjects != null && !excludeObjects .isEmpty ()) {
173- excludeObjectsList = new ArrayList <>(Arrays .asList (excludeObjects .split ("," )));
174- } else {
175- excludeObjectsList = new ArrayList <>();
176- }
177-
178- final ArrayList <String > finalIncludeObjectsList = includeObjectsList ;
179- final ArrayList <String > finalExcludeObjectsList = excludeObjectsList ;
158+ final List <String > finalIncludeObjectsList = getObjectList (includeObjects );
159+ final List <String > finalExcludeObjectsList = getObjectList (excludeObjects );
180160
181161 final DataSource dataSource = DataSourceProvider .getDataSource (getConnectionInfo (), getReporterManager ().getNumberOfReporters () + 1 );
182162
@@ -236,6 +216,16 @@ public int run() {
236216 return 1 ;
237217 }
238218
219+ private ArrayList <String > getObjectList (String includeObjects ) {
220+ ArrayList <String > includeObjectsList ;
221+ if (includeObjects != null && !includeObjects .isEmpty ()) {
222+ includeObjectsList = new ArrayList <>(Arrays .asList (includeObjects .split ("," )));
223+ } else {
224+ includeObjectsList = new ArrayList <>();
225+ }
226+ return includeObjectsList ;
227+ }
228+
239229 @ Override
240230 public String getCommand () {
241231 return "run" ;
@@ -244,7 +234,7 @@ public String getCommand() {
244234
245235 private void outputMainInformation () {
246236
247- StringBlockFormatter formatter = new StringBlockFormatter ("utPLCSL cli" );
237+ StringBlockFormatter formatter = new StringBlockFormatter ("utPLSQL cli" );
248238 formatter .appendLine (CliVersionInfo .getInfo ());
249239 formatter .appendLine (JavaApiVersionInfo .getInfo ());
250240 formatter .appendLine ("Java-Version: " + System .getProperty ("java.version" ));
@@ -322,7 +312,7 @@ private CompatibilityProxy checkFrameworkCompatibility(Connection conn) throws S
322312 return proxy ;
323313 }
324314
325- public FileMapperOptions getMapperOptions (List <String > mappingParams , List <String > filePaths ) {
315+ private FileMapperOptions getMapperOptions (List <String > mappingParams , List <String > filePaths ) {
326316 FileMapperOptions mapperOptions = new FileMapperOptions (filePaths );
327317
328318 final String OPT_OWNER ="-owner=" ;
@@ -369,25 +359,14 @@ public FileMapperOptions getMapperOptions(List<String> mappingParams, List<Strin
369359 return mapperOptions ;
370360 }
371361
372- /** Returns the version of the database framework if available
373- *
374- * @return
375- */
376- public Version getDatabaseVersion () {
377- if ( compatibilityProxy != null )
378- return compatibilityProxy .getDatabaseVersion ();
379-
380- return null ;
381- }
382-
383362 private ReporterManager getReporterManager () {
384363 if ( reporterManager == null )
385364 reporterManager = new ReporterManager (reporterParams );
386365
387366 return reporterManager ;
388367 }
389368
390- public List <ReporterOptions > getReporterOptionsList () {
369+ List <ReporterOptions > getReporterOptionsList () {
391370 return getReporterManager ().getReporterOptionsList ();
392371 }
393372}
0 commit comments