Revision 478
Added by berkley about 24 years ago
src/edu/ucsb/nceas/metacat/MetaCatServlet.java | ||
---|---|---|
582 | 582 |
resultset.append("<resultset>\n"); |
583 | 583 |
|
584 | 584 |
resultset.append(" <query>" + xmlquery + "</query>"); |
585 |
|
|
586 |
Enumeration doclistkeys = doclist.keys(); |
|
587 |
while (doclistkeys.hasMoreElements()) |
|
585 |
|
|
586 |
if(doclist != null) |
|
588 | 587 |
{ |
589 |
docid = (String)doclistkeys.nextElement(); |
|
590 |
document = (String)doclist.get(docid); |
|
591 |
resultset.append(" <document>" + document + "</document>"); |
|
592 |
} |
|
588 |
Enumeration doclistkeys = doclist.keys(); |
|
589 |
while (doclistkeys.hasMoreElements()) |
|
590 |
{ |
|
591 |
docid = (String)doclistkeys.nextElement(); |
|
592 |
document = (String)doclist.get(docid); |
|
593 |
resultset.append(" <document>" + document + "</document>"); |
|
594 |
} |
|
595 |
} |
|
596 |
|
|
593 | 597 |
resultset.append("</resultset>"); |
594 | 598 |
//System.out.println(resultset.toString()); |
595 | 599 |
return resultset.toString(); |
Also available in: Unified diff
fixed bug that caused a nullPointerException when a null resultset was returned.