[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Fri Apr 23 05:15:42 UTC 2010


gordonp
Fri Apr 23 01:15:42 EDT 2010
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util
In directory dev.open-bio.org:/tmp/cvs-serv24471/src/main/ca/ucalgary/services/util

Modified Files:
	PBERecorder.java 
Log Message:
Truncate long example data abruptly if it has no whitespace
moby-live/Java/src/main/ca/ucalgary/services/util PBERecorder.java,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/PBERecorder.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/PBERecorder.java	2010/03/29 20:59:54	1.4
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/PBERecorder.java	2010/04/23 05:15:41	1.5
@@ -795,7 +795,10 @@
 	}
 
 	int end = text.length();
-	if(start + targetWord.length() + numChars < text.length()){
+	if(text.indexOf(" ") == -1){
+	    end = numChars;
+	}
+	else if(start + targetWord.length() + numChars < text.length()){
 	    end = start + targetWord.length() + numChars;
 	    // break at a word boundary
 	    while(end < text.length() && !Character.isWhitespace(text.charAt(end))){




More information about the MOBY-guts mailing list