mirror of https://github.com/apache/lucene.git
- Applied Mark Hayes' patch to avoid NPE.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@149719 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
678386d4e9
commit
b5e126c654
|
@ -110,12 +110,12 @@
|
||||||
%>
|
%>
|
||||||
<tr>
|
<tr>
|
||||||
<%
|
<%
|
||||||
Document doc = hits.doc(i); //get the next document
|
Document doc = hits.doc(i); //get the next document
|
||||||
String doctitle = doc.get("title"); //get its title
|
String doctitle = doc.get("title"); //get its title
|
||||||
String url = doc.get("url"); //get its url field
|
String url = doc.get("url"); //get its url field
|
||||||
if (doctitle.equals("")) //use the url if it has no title
|
if ((doctitle == null) || doctitle.equals("")) //use the url if it has no title
|
||||||
doctitle = url;
|
doctitle = url;
|
||||||
//then output!
|
//then output!
|
||||||
%>
|
%>
|
||||||
<td><a href="<%=url%>"><%=doctitle%></a></td>
|
<td><a href="<%=url%>"><%=doctitle%></a></td>
|
||||||
<td><%=doc.get("summary")%></td>
|
<td><%=doc.get("summary")%></td>
|
||||||
|
|
Loading…
Reference in New Issue