Revision: 9863
http://languagetool.svn.sourceforge.net/languagetool/?rev=9863&view=rev
Author: dnaber
Date: 2013-04-02 20:11:04 +0000 (Tue, 02 Apr 2013)
Log Message:
-----------
avoid NullPointerException if no rules are disabled for the language
Modified Paths:
--------------
trunk/ltcommunity/grails-app/controllers/org/languagetool/WikiCheckController.groovy
Modified:
trunk/ltcommunity/grails-app/controllers/org/languagetool/WikiCheckController.groovy
===================================================================
---
trunk/ltcommunity/grails-app/controllers/org/languagetool/WikiCheckController.groovy
2013-04-02 19:45:10 UTC (rev 9862)
+++
trunk/ltcommunity/grails-app/controllers/org/languagetool/WikiCheckController.groovy
2013-04-02 20:11:04 UTC (rev 9863)
@@ -60,9 +60,12 @@
checker.setDisabledRuleIds(Arrays.asList(params.disabled.split(",")))
} else {
List<String> allDisabledRules =
langToDisabledRules.getProperty("all").split(",")
- List<String> langSpecificDisabledRules =
langToDisabledRules.get(language.getShortName()).split(",")
- if (langSpecificDisabledRules) {
- allDisabledRules.addAll(langSpecificDisabledRules)
+ String langSpecificDisabledRulesStr =
langToDisabledRules.get(language.getShortName())
+ if (langSpecificDisabledRulesStr) {
+ List<String> langSpecificDisabledRules =
langSpecificDisabledRulesStr.split(",")
+ if (langSpecificDisabledRules) {
+ allDisabledRules.addAll(langSpecificDisabledRules)
+ }
}
checker.setDisabledRuleIds(allDisabledRules)
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits