ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shalg...@apache.org
Subject svn commit: r1498691 - /ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/attributes/subject/SubjectAttributeClassifier.java
Date Mon, 01 Jul 2013 21:15:08 GMT
Author: shalgrim
Date: Mon Jul  1 21:15:08 2013
New Revision: 1498691

URL: http://svn.apache.org/r1498691
Log:
fixing a null pointer exception

Modified:
    ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/attributes/subject/SubjectAttributeClassifier.java

Modified: ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/attributes/subject/SubjectAttributeClassifier.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/attributes/subject/SubjectAttributeClassifier.java?rev=1498691&r1=1498690&r2=1498691&view=diff
==============================================================================
--- ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/attributes/subject/SubjectAttributeClassifier.java
(original)
+++ ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/attributes/subject/SubjectAttributeClassifier.java
Mon Jul  1 21:15:08 2013
@@ -186,9 +186,13 @@ public class SubjectAttributeClassifier 
 				// check if there are one-removed dependencies on the dependency path
 				DependencyPath path = DependencyUtility.getPath(jCas, DependencyUtility.getNominalHeadNode(jCas,tok),

 						DependencyUtility.getNominalHeadNode(jCas,mention));
-				int commonInd = path.indexOf(path.getCommonNode());
-				if (commonInd==1 || commonInd==path.size()-2) {
-					vfeat.put(FAMILY_DEPTOK, true);
+				
+				// 6/28/13 srh fixing for null pointer exception
+				if (path != null) {
+					int commonInd = path.indexOf(path.getCommonNode());
+					if (commonInd==1 || commonInd==path.size()-2) {
+						vfeat.put(FAMILY_DEPTOK, true);
+					}
 				}
 			}
 			



Mime
View raw message