@@ -129,7 +129,7 @@ public SkylineToolsStoreController()
129129 }
130130
131131 @ RequiresPermission (ReadPermission .class )
132- public class BeginAction extends SimpleViewAction
132+ public static class BeginAction extends SimpleViewAction < Object >
133133 {
134134 @ Override
135135 public ModelAndView getView (Object o , BindException errors ) throws Exception
@@ -460,7 +460,7 @@ public ModelAndView handleRequestInternal(HttpServletRequest httpServletRequest,
460460 ArrayList <User > toolOwnersUsers = parsedOwners .first ;
461461 ArrayList <String > toolOwnersInvalid = parsedOwners .second ;
462462
463- if (toolOwnersInvalid .size () > 0 )
463+ if (! toolOwnersInvalid .isEmpty () )
464464 {
465465 getViewContext ().getRequest ().setAttribute (BindingResult .MODEL_KEY_PREFIX + "form" ,
466466 UNKNOWN_USERS + StringUtils .join (toolOwnersInvalid , ", " ));
@@ -607,7 +607,7 @@ else if (!getContainer().hasPermission(getUser(), InsertPermission.class))
607607 getViewContext ().getRequest ().setAttribute (BindingResult .MODEL_KEY_PREFIX + "sender" , sender );
608608 getViewContext ().getRequest ().setAttribute (BindingResult .MODEL_KEY_PREFIX + "updatetarget" , updateTargetString );
609609 getViewContext ().getRequest ().setAttribute (BindingResult .MODEL_KEY_PREFIX + "toolowners" , toolOwners );
610- return new JspView ("/org/labkey/skylinetoolsstore/view/SkylineToolsStoreUpload.jsp" , null );
610+ return new JspView <> ("/org/labkey/skylinetoolsstore/view/SkylineToolsStoreUpload.jsp" , null );
611611 }
612612
613613 @ Override
@@ -667,9 +667,9 @@ protected ModelAndView handleRequestInternal(HttpServletRequest httpServletReque
667667 final String ratingIdString = httpServletRequest .getParameter ("ratingId" );
668668 int ratingId ;
669669 try {
670- ratingId = (ratingIdString != null && !ratingIdString .isEmpty ()) ? Integer .parseInt (ratingIdString ) : -1 ;;
670+ ratingId = (ratingIdString != null && !ratingIdString .isEmpty ()) ? Integer .parseInt (ratingIdString ) : -1 ;
671671 } catch (Exception e ) {
672- return new JspView ("/org/labkey/skylinetoolsstore/view/SkylineRating.jsp" , null );
672+ return new JspView <> ("/org/labkey/skylinetoolsstore/view/SkylineRating.jsp" , null );
673673 }
674674 Rating rating = (ratingId < 0 ) ? null : RatingManager .get ().getRatingById (ratingId );
675675 final SkylineTool tool = SkylineToolsStoreManager .get ().getTool ((toolId >= 0 ) ? toolId : rating .getToolId ());
@@ -679,7 +679,7 @@ protected ModelAndView handleRequestInternal(HttpServletRequest httpServletReque
679679 try {
680680 ratingValue = Integer .parseInt (ratingValueString );
681681 } catch (Exception e ) {
682- return new JspView ("/org/labkey/skylinetoolsstore/view/SkylineRating.jsp" , null );
682+ return new JspView <> ("/org/labkey/skylinetoolsstore/view/SkylineRating.jsp" , null );
683683 }
684684 final String ratingTitle = httpServletRequest .getParameter ("title" );
685685 final String review = httpServletRequest .getParameter ("review" );
@@ -701,7 +701,7 @@ else if (ratingValue < 1 || ratingValue > 5)
701701 getViewContext ().getRequest ().setAttribute (BindingResult .MODEL_KEY_PREFIX + "form" ,
702702 NO_RATING );
703703 }
704- else if (review == null || review .length () == 0 )
704+ else if (review == null || review .isEmpty () )
705705 {
706706 getViewContext ().getRequest ().setAttribute (BindingResult .MODEL_KEY_PREFIX + "form" ,
707707 NO_REVIEW );
@@ -748,7 +748,7 @@ else if (tool == null || (ratingId >= 0 && rating == null))
748748 if (review != null )
749749 getViewContext ().getRequest ().setAttribute (BindingResult .MODEL_KEY_PREFIX + "formReview" , review );
750750
751- return new JspView ("/org/labkey/skylinetoolsstore/view/SkylineRating.jsp" , null );
751+ return new JspView <> ("/org/labkey/skylinetoolsstore/view/SkylineRating.jsp" , null );
752752 }
753753
754754 @ Override
@@ -813,7 +813,7 @@ public ModelAndView handleRequestInternal(HttpServletRequest httpServletRequest,
813813 {
814814 httpServletRequest .setAttribute (BindingResult .MODEL_KEY_PREFIX + "form" , INVALID_TOOL_ID + " " + suppTargetString );
815815 httpServletRequest .setAttribute (BindingResult .MODEL_KEY_PREFIX + "supptarget" , suppTargetString );
816- return new JspView ("/org/labkey/skylinetoolsstore/view/SkylineToolSupplementUpload.jsp" , null );
816+ return new JspView <> ("/org/labkey/skylinetoolsstore/view/SkylineToolSupplementUpload.jsp" , null );
817817 }
818818
819819 SkylineTool tool = SkylineToolsStoreManager .get ().getTool (suppTarget );
@@ -846,7 +846,7 @@ public ModelAndView handleRequestInternal(HttpServletRequest httpServletRequest,
846846 }
847847
848848 getViewContext ().getRequest ().setAttribute (BindingResult .MODEL_KEY_PREFIX + "supptarget" , suppTargetString );
849- return new JspView ("/org/labkey/skylinetoolsstore/view/SkylineToolSupplementUpload.jsp" , null );
849+ return new JspView <> ("/org/labkey/skylinetoolsstore/view/SkylineToolSupplementUpload.jsp" , null );
850850 }
851851
852852 @ Override
@@ -902,7 +902,7 @@ public void checkPermissions() throws UnauthorizedException
902902 }
903903
904904 @ RequiresLogin
905- public class DeleteAction extends FormHandlerAction <IdForm >
905+ public static class DeleteAction extends FormHandlerAction <IdForm >
906906 {
907907 @ Override
908908 public URLHelper getSuccessURL (IdForm idForm )
@@ -1002,7 +1002,7 @@ public class DeleteLatestAction extends AbstractController implements Permission
10021002 @ Override
10031003 public ModelAndView handleRequestInternal (HttpServletRequest httpServletRequest , HttpServletResponse httpServletResponse ) throws Exception
10041004 {
1005- Integer id ;
1005+ int id ;
10061006 try {
10071007 id = Integer .parseInt (httpServletRequest .getParameter ("id" ));
10081008 }
@@ -1156,7 +1156,7 @@ public void checkPermissions() throws UnauthorizedException
11561156
11571157 @ RequiresNoPermission
11581158 @ ActionNames ("downloadFile" )
1159- public class DownloadToolFileAction extends SimpleViewAction <DownloadFileForm > implements PermissionCheckable
1159+ public static class DownloadToolFileAction extends SimpleViewAction <DownloadFileForm > implements PermissionCheckable
11601160 {
11611161 @ Override
11621162 public ModelAndView getView (DownloadFileForm form , BindException errors ) throws Exception
@@ -1243,8 +1243,7 @@ public ModelAndView getView(ViewToolDetailsForm form, BindException errors) thro
12431243 _tool = SkylineToolsStoreManager .get ().getTool (toolId );
12441244 if (_tool == null )
12451245 {
1246- StringBuilder msg = new StringBuilder ("Could not find tool " ).append (" by Id " ).append (toolId );
1247- errors .reject (SpringActionController .ERROR_MSG , msg .toString ());
1246+ errors .reject (SpringActionController .ERROR_MSG , "Could not find tool " + " by Id " + toolId );
12481247 return new SimpleErrorView (errors );
12491248 }
12501249 }
@@ -1396,7 +1395,7 @@ public ModelAndView handleRequestInternal(HttpServletRequest httpServletRequest,
13961395 getViewContext ().getRequest ().setAttribute (BindingResult .MODEL_KEY_PREFIX + "toolowners" , toolOwners );
13971396 getViewContext ().getRequest ().setAttribute (BindingResult .MODEL_KEY_PREFIX + "sender" , sender );
13981397 getViewContext ().getRequest ().setAttribute (BindingResult .MODEL_KEY_PREFIX + "updatetarget" , updateTargetString );
1399- return new JspView ("/org/labkey/skylinetoolsstore/view/SkylineToolManageOwners.jsp" , null );
1398+ return new JspView <> ("/org/labkey/skylinetoolsstore/view/SkylineToolManageOwners.jsp" , null );
14001399 }
14011400
14021401 @ Override
@@ -1414,7 +1413,7 @@ public class UpdatePropertyAction extends AbstractController implements Permissi
14141413 @ Override
14151414 public ModelAndView handleRequestInternal (HttpServletRequest httpServletRequest , HttpServletResponse httpServletResponse ) throws Exception
14161415 {
1417- final Integer id = Integer .parseInt (httpServletRequest .getParameter ("id" ));
1416+ final int id = Integer .parseInt (httpServletRequest .getParameter ("id" ));
14181417
14191418 final SkylineTool tool = SkylineToolsStoreManager .get ().getTool (id );
14201419 if (tool == null )
0 commit comments