Revision 3250
Added by Jing Tao over 17 years ago
src/edu/ucsb/nceas/metacat/Sitemap.java | ||
---|---|---|
230 | 230 |
* if there is a problem writing to the Writer |
231 | 231 |
*/ |
232 | 232 |
private void writeSitemapFooter(Writer sitemap) throws IOException { |
233 |
String footer = "</urlset>\n"; |
|
234 |
sitemap.write(footer); |
|
235 |
sitemap.close(); |
|
233 |
if (sitemap != null) |
|
234 |
{ |
|
235 |
String footer = "</urlset>\n"; |
|
236 |
sitemap.write(footer); |
|
237 |
sitemap.close(); |
|
238 |
} |
|
236 | 239 |
} |
237 | 240 |
|
238 | 241 |
// Member variables |
Also available in: Unified diff
Fixed bug that if Writer object is null, code will generate null exception