@@ -116,14 +116,10 @@ public class RunCommand implements ICommand {
116116 private ReporterFactory reporterFactory ;
117117 private ReporterManager reporterManager ;
118118
119- public ConnectionInfo getConnectionInfo () {
119+ private ConnectionInfo getConnectionInfo () {
120120 return connectionInfoList .get (0 );
121121 }
122122
123- public List <String > getTestPaths () {
124- return testPaths ;
125- }
126-
127123 void init () {
128124
129125 LoggerConfiguration .ConfigLevel level = LoggerConfiguration .ConfigLevel .BASIC ;
@@ -144,7 +140,6 @@ public int run() {
144140 try {
145141
146142 final List <Reporter > reporterList ;
147- final List <String > testPaths = getTestPaths ();
148143
149144 final File baseDir = new File ("" ).getAbsoluteFile ();
150145 final FileMapperOptions [] sourceMappingOptions = {null };
@@ -155,23 +150,8 @@ public int run() {
155150 sourceMappingOptions [0 ] = getFileMapperOptionsByParamListItem (this .sourcePathParams , baseDir );
156151 testMappingOptions [0 ] = getFileMapperOptionsByParamListItem (this .testPathParams , baseDir );
157152
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 );
175155
176156 final DataSource dataSource = DataSourceProvider .getDataSource (getConnectionInfo (), getReporterManager ().getNumberOfReporters () + 1 );
177157
@@ -231,6 +211,16 @@ public int run() {
231211 return 1 ;
232212 }
233213
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+
234224 @ Override
235225 public String getCommand () {
236226 return "run" ;
@@ -239,7 +229,7 @@ public String getCommand() {
239229
240230 private void outputMainInformation () {
241231
242- StringBlockFormatter formatter = new StringBlockFormatter ("utPLCSL cli" );
232+ StringBlockFormatter formatter = new StringBlockFormatter ("utPLSQL cli" );
243233 formatter .appendLine (CliVersionInfo .getInfo ());
244234 formatter .appendLine (JavaApiVersionInfo .getInfo ());
245235 formatter .appendLine ("Java-Version: " + System .getProperty ("java.version" ));
@@ -317,7 +307,7 @@ private CompatibilityProxy checkFrameworkCompatibility(Connection conn) throws S
317307 return proxy ;
318308 }
319309
320- public FileMapperOptions getMapperOptions (List <String > mappingParams , List <String > filePaths ) {
310+ private FileMapperOptions getMapperOptions (List <String > mappingParams , List <String > filePaths ) {
321311 FileMapperOptions mapperOptions = new FileMapperOptions (filePaths );
322312
323313 final String OPT_OWNER ="-owner=" ;
@@ -364,25 +354,14 @@ public FileMapperOptions getMapperOptions(List<String> mappingParams, List<Strin
364354 return mapperOptions ;
365355 }
366356
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-
378357 private ReporterManager getReporterManager () {
379358 if ( reporterManager == null )
380359 reporterManager = new ReporterManager (reporterParams );
381360
382361 return reporterManager ;
383362 }
384363
385- public List <ReporterOptions > getReporterOptionsList () {
364+ List <ReporterOptions > getReporterOptionsList () {
386365 return getReporterManager ().getReporterOptionsList ();
387366 }
388367}
0 commit comments