Revision: 7554
          
http://languagetool.svn.sourceforge.net/languagetool/?rev=7554&view=rev
Author:   dnaber
Date:     2012-06-29 12:41:28 +0000 (Fri, 29 Jun 2012)
Log Message:
-----------
prevent NullPointerException after redirect

Modified Paths:
--------------
    
trunk/ltcommunity/grails-app/controllers/org/languagetool/RuleController.groovy

Modified: 
trunk/ltcommunity/grails-app/controllers/org/languagetool/RuleController.groovy
===================================================================
--- 
trunk/ltcommunity/grails-app/controllers/org/languagetool/RuleController.groovy 
    2012-06-29 12:28:12 UTC (rev 7553)
+++ 
trunk/ltcommunity/grails-app/controllers/org/languagetool/RuleController.groovy 
    2012-06-29 12:41:28 UTC (rev 7554)
@@ -266,8 +266,10 @@
         boolean isUserRule = rule.isUserRule
         int disableId = getEnableDisableId(selectedRule, params.id, lang)
         if (!selectedRule) {
+            log.warn("No rule with id ${params.id} and language ${lang}")
             flash.message = "No rule with id ${params.id.encodeAsHTML()}"
             redirect(action:list)
+            return
         }
         String textToCheck = ""
         if (params.textToCheck) {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Languagetool-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-cvs

Reply via email to