Skip to content

Commit 55b8185

Browse files
committed
v 4.5, fix #16
1 parent 8f3c8d0 commit 55b8185

File tree

6 files changed

+26
-8
lines changed

6 files changed

+26
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Add this library to classpath:
1212
<dependency>
1313
<groupId>cz.jiripinkas</groupId>
1414
<artifactId>jsitemapgenerator</artifactId>
15-
<version>4.4</version>
15+
<version>4.5</version>
1616
</dependency>
1717

1818
If you want to use "ping google / bing" functionality, also add this library to classpath:

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>cz.jiripinkas</groupId>
55
<artifactId>jsitemapgenerator</artifactId>
6-
<version>4.4</version>
6+
<version>4.5</version>
77
<packaging>jar</packaging>
88
<name>Java sitemap generator</name>
99
<description>This library generates a web sitemap and can ping Google that it has changed. This project has been

src/main/java/cz/jiripinkas/jsitemapgenerator/generator/RssGenerator.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,25 @@ public class RssGenerator extends AbstractGenerator<RssGenerator> {
2020
private String defaultExtension;
2121

2222
/**
23-
* Create RssGenerator
23+
* Creates RssGenerator.
24+
* This constructor is public, because sometimes somebody wants RssGenerator to be
25+
* a Spring bean and Spring wants to create a proxy which requires public constructor.
26+
* But you shouldn't call this constructor on your own, use {@link RssGenerator#of(String, String, String)} instead.
2427
*
2528
* @param baseUrl Base URL
2629
* @param root If Base URL is root (for example http://www.javavids.com or if
2730
* it's some path like http://www.javalibs.com/blog)
2831
* @param webTitle Web title
2932
* @param webDescription Web description
3033
*/
31-
private RssGenerator(String baseUrl, boolean root, String webTitle, String webDescription) {
34+
public RssGenerator(String baseUrl, boolean root, String webTitle, String webDescription) {
3235
super(baseUrl, root);
3336
this.webTitle = webTitle;
3437
this.webDescription = webDescription;
3538
}
3639

3740
/**
38-
* Create RssGenerator. Root = true.
41+
* Creates RssGenerator. Root = true.
3942
*
4043
* @param baseUrl Base URL
4144
* @param webTitle Web title

src/main/java/cz/jiripinkas/jsitemapgenerator/generator/SitemapGenerator.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ public enum AdditionalNamespace {
1717
}
1818

1919
/**
20+
* This constructor is public, because sometimes somebody wants SitemapGenerator to be
21+
* a Spring bean and Spring wants to create a proxy which requires public constructor.
22+
* But you shouldn't call this constructor on your own, use {@link SitemapGenerator#of(String)} instead.
2023
* @param baseUrl Base URL
2124
*/
22-
private SitemapGenerator(String baseUrl) {
25+
public SitemapGenerator(String baseUrl) {
2326
super(baseUrl);
2427
}
2528

src/main/java/cz/jiripinkas/jsitemapgenerator/generator/SitemapIndexGenerator.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@
1414
public class SitemapIndexGenerator extends AbstractSitemapGenerator<SitemapIndexGenerator> {
1515

1616
/**
17-
* @param baseUrl Base url
17+
* This constructor is public, because sometimes somebody wants SitemapIndexGenerator to be
18+
* a Spring bean and Spring wants to create a proxy which requires public constructor.
19+
* But you shouldn't call this constructor on your own, use {@link SitemapIndexGenerator#of(String)} instead.
20+
* @param baseUrl Base URL
1821
*/
19-
private SitemapIndexGenerator(String baseUrl) {
22+
public SitemapIndexGenerator(String baseUrl) {
2023
super(baseUrl);
2124
}
2225

src/main/java/cz/jiripinkas/jsitemapgenerator/robots/RobotsTxtGenerator.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package cz.jiripinkas.jsitemapgenerator.robots;
22

33
import cz.jiripinkas.jsitemapgenerator.UrlUtil;
4+
import cz.jiripinkas.jsitemapgenerator.generator.SitemapGenerator;
45

56
import java.util.ArrayList;
67
import java.util.List;
@@ -13,6 +14,14 @@ public class RobotsTxtGenerator {
1314

1415
private String baseUrl;
1516

17+
/**
18+
* This constructor is public, because sometimes somebody wants RobotsTxtGenerator to be
19+
* a Spring bean and Spring wants to create a proxy which requires public constructor.
20+
* But you shouldn't call this constructor on your own, use {@link RobotsTxtGenerator#of(String)} instead.
21+
*/
22+
public RobotsTxtGenerator() {
23+
}
24+
1625
public static RobotsTxtGenerator of(String baseUrl) {
1726
RobotsTxtGenerator robotsTxtGenerator = new RobotsTxtGenerator();
1827
if (!baseUrl.endsWith("/")) {

0 commit comments

Comments
 (0)