mirror of https://github.com/apache/lucene.git
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:
parent
e7fe4cf429
commit
e6df3c5da9
|
@ -372,8 +372,7 @@
|
||||||
if (needRaw) {
|
if (needRaw) {
|
||||||
printRow(out,"raw text", arr, new ToStr() {
|
printRow(out,"raw text", arr, new ToStr() {
|
||||||
public String toStr(Object o) {
|
public String toStr(Object o) {
|
||||||
// todo: output in hex or something?
|
// page is UTF-8, so anything goes.
|
||||||
// check if it's all ascii or not?
|
|
||||||
return ((Tok)o).token.termText();
|
return ((Tok)o).token.termText();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -386,7 +385,12 @@
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
printRow(out,"term type", arr, new ToStr() {
|
printRow(out,"term type", arr, new ToStr() {
|
||||||
public String toStr(Object o) {
|
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
|
,true
|
||||||
|
|
Loading…
Reference in New Issue