Buggy code:
@ Controller @ RequestMapping ( "//ivis" ) public class IvisController { Logger log = Logger . getLogger ( IvisController . class . getName ( ) ) ; @ Autowired private ApplicationContext appContext ; @ Autowired private OAuth2ProtectedResourceDetails client ; public static final String GRANT_TYPE = "authorization_code" ; @ Value ( "${AuthorizationCodeHandlerUri}" ) public String tokenHandler ; @ Value ( "${StatementsAddress}" ) private String statementsAddress ; @ Value ( "${ServerAddress}" ) private String serverAddress ; @ Value ( "${ClientAddress}" ) private String clientAddress ; @ RequestMapping ( "//code" ) @ ResponseBody public String getCode ( WebRequest webRequest , HttpServletRequest request , HttpServletResponse response , @ RequestParam ( value = "code" , required = false ) String code , @ RequestParam ( value = "redirect_uri" , required = false ) String redirectUri , @ RequestParam ( value = "docId" , required = false ) String docId ) throws IOException , URISyntaxException { } @ RequestMapping ( "//token" ) @ ResponseBody public String getToken ( HttpServletResponse response ) throws IOException { } @ RequestMapping ( value = "//{id}" , params = { "status" } , method = RequestMethod . GET ) public void updateStatus ( HttpServletRequest request , HttpServletResponse response , @ PathVariable ( "id" ) Long applicationId , @ RequestParam ( "status" ) Decision . Status status ) throws IOException { } @ RequestMapping ( value = "edit//{id}" , method = RequestMethod . POST ) public void editApplication ( HttpServletRequest request , HttpServletResponse response , @ PathVariable ( "id" ) Long applicationId , @ ModelAttribute ( "applicationForm" ) ApplicationFormCmd applicationFormCmd , BindingResult bindingResult ) throws IOException { } @ RequestMapping ( value = "commentDecision//{id}" , method = RequestMethod . POST ) public void addDecisionComment ( HttpServletRequest request , HttpServletResponse response , @ PathVariable ( "id" ) Long applicationId ) throws IOException { if ( ( IvisOAuth2Utils . getAccessToken ( request ) ) != null ) { String commentTextarea = request . getParameter ( "commentTextarea" ) ; if ( ! ( isEmptyOrNull ( commentTextarea ) ) ) { final IvisServiceFactory ivisServiceFactory = getIvisServiceFactory ( request ) ; ApplicationService service = ivisServiceFactory . getService ( ApplicationService . class ) ; Application application = service . find ( applicationId ) ; Decision decision = application . getDecision ( ) ; <START_BUG> decision . setComment ( ( ( ( decision . getComment ( ) ) + "<br//>" ) + commentTextarea ) ) ; <END_BUG> application . setDecision ( decision ) ; service . save ( application ) ; } } response . sendRedirect ( ( ( ( Imcms . getServerProperties ( ) . getProperty ( "ClientAddress" ) ) + "//applications//show?id=" ) + applicationId ) ) ; } private boolean isEmptyOrNull ( String str ) { } @ Deprecated @ RequestMapping ( value = "//xml" , method = RequestMethod . POST ) public void importApplication ( HttpServletRequest request , HttpServletResponse response , @ RequestParam ( value = "file" , required = false ) MultipartFile file , Model model ) throws IOException , URISyntaxException { } @ RequestMapping ( value = "//xml" , method = RequestMethod . GET ) @ ResponseBody public String showImportApplicationForm ( ) { } @ RequestMapping ( value = "//pupils" , method = RequestMethod . POST ) public void updatePupil ( @ ModelAttribute ( "pupil" ) Pupil pupil , HttpServletRequest request , HttpServletResponse response ) throws IOException { } @ RequestMapping ( value = "//applications" , method = RequestMethod . POST ) public void updateApplication ( @ ModelAttribute ( "app" ) Application application , HttpServletRequest request , HttpServletResponse response ) throws IOException { } private String getRequestReferer ( HttpServletRequest request ) { } private void checkServiceFactory ( HttpServletRequest request ) { } private IvisServiceFactory getIvisServiceFactory ( HttpServletRequest request ) { } private void saveApplication ( Application application , IvisServiceFactory ivisServiceFactory ) { } }

Fix:
decision . setComment ( ( ! ( decision . getComment ( ) . isEmpty ( ) ) ? ( ( decision . getComment ( ) ) + "<br//>" ) + commentTextarea : commentTextarea ) ) ;