- 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:
Otis Gospodnetic 2002-04-02 05:15:43 +00:00
parent 678386d4e9
commit b5e126c654
1 changed files with 5 additions and 5 deletions

View File

@ -113,7 +113,7 @@
Document doc = hits.doc(i); //get the next document
String doctitle = doc.get("title"); //get its title
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;
//then output!
%>