dfabulich/sitemapgen4j — pull request #3 by mkurz (2014-12-02 23:17:02+00:00)
Title: Allow to create index even when only (one) sitemap.xml exists

This is a fix for https://code.google.com/p/sitemapgen4j/issues/detail?id=8
When the number of total urls is smaller than maxUrls (50 000) and then using `writeSitemapsWithIndex` "only" the `sitemap.xml` will be generated and the `count` of sitemaps (e.g. sitemap1.xml, sitemap2.xml) is 0.
As a result when trying to write the Sitemap index file with `writeSitemapsWithIndex` we get an exception:

java.lang.RuntimeException: No URLs added, sitemap index would be empty; you must add some URLs with addUrls

This pull request is basically the patch from [comment 8](https://code.google.com/p/sitemapgen4j/issues/detail?id=8#c3).

@dfabulich Could you please merge and also release a new version? Thanks!