fix handling of null token type in analysis.jsp

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@634671 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2008-03-07 13:42:45 +00:00
parent e7fe4cf429
commit e6df3c5da9
1 changed files with 7 additions and 3 deletions

View File

@ -372,8 +372,7 @@
if (needRaw) {
printRow(out,"raw text", arr, new ToStr() {
public String toStr(Object o) {
// todo: output in hex or something?
// check if it's all ascii or not?
// page is UTF-8, so anything goes.
return ((Tok)o).token.termText();
}
}
@ -386,7 +385,12 @@
if (verbose) {
printRow(out,"term type", arr, new ToStr() {
public String toStr(Object o) {
return ((Tok)o).token.type();
String tt = ((Tok)o).token.type();
if (tt == null) {
return "null";
} else {
return tt;
}
}
}
,true