@@ -221,7 +221,10 @@ public class FastqcReportAction extends SimpleViewAction<FastqcForm>
221221 public ModelAndView getView (FastqcForm form , BindException errors ) throws Exception
222222 {
223223 if (form .getFilenames () == null && form .getDataIds () == null )
224- errors .reject ("Must provide a filename or Exp data Ids" );
224+ {
225+ errors .reject (ERROR_MSG , "Must provide a filename or Exp data Ids" );
226+ return null ;
227+ }
225228
226229 //resolve files
227230 List <File > files = new ArrayList <>();
@@ -597,20 +600,20 @@ public void validateCommand(DeleteForm form, Errors errors)
597600 {
598601 if (form .getSchema () == null )
599602 {
600- errors .reject ("No schema provided" );
603+ errors .reject (ERROR_MSG , "No schema provided" );
601604 return ;
602605 }
603606
604607 if (form .getQueryName () == null )
605608 {
606- errors .reject ("No queryName provided" );
609+ errors .reject (ERROR_MSG , "No queryName provided" );
607610 return ;
608611 }
609612
610613 _table = SequenceAnalysisSchema .getInstance ().getSchema ().getTable (form .getQueryName ());
611614 if (_table == null )
612615 {
613- errors .reject ("Unknown table: " + form .getQueryName ());
616+ errors .reject (ERROR_MSG , "Unknown table: " + form .getQueryName ());
614617 return ;
615618 }
616619
@@ -2220,7 +2223,7 @@ public ApiResponse execute(CreateReferenceLibraryForm form, BindException errors
22202223 String [] coordinates = t .split ("-" );
22212224 if (coordinates .length != 2 )
22222225 {
2223- errors .reject ("Inproper interval: [" + t + "]" );
2226+ errors .reject (ERROR_MSG , "Inproper interval: [" + t + "]" );
22242227 return null ;
22252228 }
22262229
@@ -3143,7 +3146,7 @@ public void exec(ResultSet object) throws SQLException
31433146 String wholeSequence = model .getSequence ();
31443147 if (wholeSequence == null )
31453148 {
3146- errors .reject ("Unable to find sequence for: " + rowId );
3149+ errors .reject (ERROR_MSG , "Unable to find sequence for: " + rowId );
31473150 return ;
31483151 }
31493152
@@ -3152,21 +3155,21 @@ public void exec(ResultSet object) throws SQLException
31523155 String [] coordinates = t .split ("-" );
31533156 if (coordinates .length != 2 )
31543157 {
3155- errors .reject ("Inproper interval: [" + t + "]" );
3158+ errors .reject (ERROR_MSG , "Inproper interval: [" + t + "]" );
31563159 return ;
31573160 }
31583161
31593162 Integer start = StringUtils .trimToNull (coordinates [0 ]) == null ? null : ConvertHelper .convert (coordinates [0 ], Integer .class );
31603163 if (wholeSequence .length () < start )
31613164 {
3162- errors .reject ("Start is beyond the length of the sequence. Length: " + wholeSequence .length ());
3165+ errors .reject (ERROR_MSG , "Start is beyond the length of the sequence. Length: " + wholeSequence .length ());
31633166 return ;
31643167 }
31653168
31663169 Integer stop = StringUtils .trimToNull (coordinates [1 ]) == null ? null : ConvertHelper .convert (coordinates [1 ], Integer .class );
31673170 if (wholeSequence .length () < stop )
31683171 {
3169- errors .reject ("Stop is beyond the length of the sequence. Length: " + wholeSequence .length ());
3172+ errors .reject (ERROR_MSG , "Stop is beyond the length of the sequence. Length: " + wholeSequence .length ());
31703173 return ;
31713174 }
31723175
@@ -3274,7 +3277,7 @@ public ApiResponse execute(RecreateReferenceLibraryForm form, BindException erro
32743277 {
32753278 if (form .getLibraryIds () == null || form .getLibraryIds ().length == 0 )
32763279 {
3277- errors .reject ("Must provide a list of reference genomes to re-process" );
3280+ errors .reject (ERROR_MSG , "Must provide a list of reference genomes to re-process" );
32783281 return null ;
32793282 }
32803283
0 commit comments