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
|
@ -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!
|
||||
%>
|
||||
|
|
Loading…
Reference in New Issue