Revision: 9854
http://languagetool.svn.sourceforge.net/languagetool/?rev=9854&view=rev
Author: gulp21-1
Date: 2013-04-02 13:27:31 +0000 (Tue, 02 Apr 2013)
Log Message:
-----------
[ltdiff] prevent crash when number of new incorrect examples is smaller than
the number of old incorrect examples and there are no new incorrect examples
Modified Paths:
--------------
trunk/languagetool/languagetool-standalone/src/main/dev/tools/ltdiff/VersionDiffGenerator.java
Modified:
trunk/languagetool/languagetool-standalone/src/main/dev/tools/ltdiff/VersionDiffGenerator.java
===================================================================
---
trunk/languagetool/languagetool-standalone/src/main/dev/tools/ltdiff/VersionDiffGenerator.java
2013-04-01 23:13:30 UTC (rev 9853)
+++
trunk/languagetool/languagetool-standalone/src/main/dev/tools/ltdiff/VersionDiffGenerator.java
2013-04-02 13:27:31 UTC (rev 9854)
@@ -133,7 +133,7 @@
for (int k = 0; k < r.correct.size(); k++) { // remove examples
which already exist in old rule
- for (int l = 0; l < oldRules.get(j).correct.size(); l++) {
+ for (int l = 0; l < oldRules.get(j).correct.size() &&
r.correct.size()>0; l++) {
if (r.correct.get(k).equals(oldRules.get(j).correct.get(l))) {
@@ -148,7 +148,7 @@
for (int k = 0; k < r.incorrect.size(); k++) { // remove examples
which already exist in old rule
- for (int l = 0; l < oldRules.get(j).incorrect.size(); l++) {
+ for (int l = 0; l < oldRules.get(j).incorrect.size() &&
r.incorrect.size()>0; l++) {
if
(r.incorrect.get(k).equals(oldRules.get(j).incorrect.get(l))) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits