You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by jo...@apache.org on 2011/11/01 00:54:30 UTC
svn commit: r1195723 -
/incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/parser/Parse.java
Author: joern
Date: Mon Oct 31 23:53:22 2011
New Revision: 1195723
URL: http://svn.apache.org/viewvc?rev=1195723&view=rev
Log:
OPENNLP-332 equals doesn't guard against IndexOutOfBoundsException. Thanks to Ben Podgursky for providing a patch.
Modified:
incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/parser/Parse.java
Modified: incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/parser/Parse.java
URL: http://svn.apache.org/viewvc/incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/parser/Parse.java?rev=1195723&r1=1195722&r2=1195723&view=diff
==============================================================================
--- incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/parser/Parse.java (original)
+++ incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/parser/Parse.java Mon Oct 31 23:53:22 2011
@@ -975,6 +975,9 @@ public class Parse implements Cloneable,
if (!this.text.equals(p.text)) {
return false;
}
+ if (this.parts.size() != p.parts.size()){
+ return false;
+ }
for (int ci=0;ci<parts.size();ci++) {
if (!parts.get(ci).equals(p.parts.get(ci))) {
return false;