From e6df3c5da9f1c88af6b21e032454d55a49796509 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Fri, 7 Mar 2008 13:42:45 +0000 Subject: [PATCH] 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 --- src/webapp/resources/admin/analysis.jsp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/webapp/resources/admin/analysis.jsp b/src/webapp/resources/admin/analysis.jsp index b3c303b3ec2..fe6d3f4e719 100644 --- a/src/webapp/resources/admin/analysis.jsp +++ b/src/webapp/resources/admin/analysis.jsp @@ -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