diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/sagan/SaganUpdater.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/sagan/SaganUpdater.java
index a0eb80cc..4af74da7 100644
--- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/sagan/SaganUpdater.java
+++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/sagan/SaganUpdater.java
@@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.cloud.release.internal.ReleaserProperties;
import org.springframework.cloud.release.internal.pom.ProjectVersion;
+import org.springframework.util.StringUtils;
/**
* @author Marcin Grzejszczak
@@ -83,7 +84,7 @@ public class SaganUpdater {
if (indexDoc.exists()) {
log.debug("Index adoc file exists");
String fileText = fileToText(indexDoc);
- if (!fileText.equals(project.rawOverview)) {
+ if (StringUtils.hasText(fileText) && !fileText.equals(project.rawOverview)) {
log.info(
"Index adoc content differs from the previously stored, will update it");
project.rawOverview = fileText;
@@ -93,7 +94,8 @@ public class SaganUpdater {
if (bootDoc.exists()) {
log.debug("Boot adoc file exists");
String fileText = fileToText(bootDoc);
- if (!fileText.equals(project.rawBootConfig)) {
+ if (StringUtils.hasText(fileText)
+ && !fileText.equals(project.rawBootConfig)) {
log.info(
"Boot adoc content differs from the previously stored, will update it");
project.rawBootConfig = fileText;
diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/git/GitTestUtils.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/git/GitTestUtils.java
index 7a816997..ef4577de 100644
--- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/git/GitTestUtils.java
+++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/git/GitTestUtils.java
@@ -29,7 +29,11 @@ import org.eclipse.jgit.transport.URIish;
/**
* @author Marcin Grzejszczak
*/
-public class GitTestUtils {
+public final class GitTestUtils {
+
+ private GitTestUtils() {
+ throw new IllegalStateException("Can't instantiate a utility class");
+ }
public static void setOriginOnProjectToTmp(File origin, File project)
throws GitAPIException, MalformedURLException {
diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/pom/TestUtils.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/pom/TestUtils.java
index 19bd1764..e14db287 100644
--- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/pom/TestUtils.java
+++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/pom/TestUtils.java
@@ -21,7 +21,11 @@ import java.io.IOException;
import org.eclipse.jgit.util.FileUtils;
-public class TestUtils {
+public final class TestUtils {
+
+ private TestUtils() {
+ throw new IllegalStateException("Can't instantiate a utility class");
+ }
public static void prepareLocalRepo() throws IOException {
prepareLocalRepo("target/test-classes/projects/", "spring-cloud");
diff --git a/spring-cloud-release-tools-spring/src/test/java/org/springframework/cloud/release/internal/git/GitTestUtils.java b/spring-cloud-release-tools-spring/src/test/java/org/springframework/cloud/release/internal/git/GitTestUtils.java
index 7a816997..ef4577de 100644
--- a/spring-cloud-release-tools-spring/src/test/java/org/springframework/cloud/release/internal/git/GitTestUtils.java
+++ b/spring-cloud-release-tools-spring/src/test/java/org/springframework/cloud/release/internal/git/GitTestUtils.java
@@ -29,7 +29,11 @@ import org.eclipse.jgit.transport.URIish;
/**
* @author Marcin Grzejszczak
*/
-public class GitTestUtils {
+public final class GitTestUtils {
+
+ private GitTestUtils() {
+ throw new IllegalStateException("Can't instantiate a utility class");
+ }
public static void setOriginOnProjectToTmp(File origin, File project)
throws GitAPIException, MalformedURLException {
diff --git a/spring-cloud-release-tools-spring/src/test/java/org/springframework/cloud/release/internal/pom/TestUtils.java b/spring-cloud-release-tools-spring/src/test/java/org/springframework/cloud/release/internal/pom/TestUtils.java
index e5a851c4..a13a6e42 100644
--- a/spring-cloud-release-tools-spring/src/test/java/org/springframework/cloud/release/internal/pom/TestUtils.java
+++ b/spring-cloud-release-tools-spring/src/test/java/org/springframework/cloud/release/internal/pom/TestUtils.java
@@ -21,7 +21,11 @@ import java.io.IOException;
import org.eclipse.jgit.util.FileUtils;
-public class TestUtils {
+public final class TestUtils {
+
+ private TestUtils() {
+ throw new IllegalStateException("Can't instantiate a utility class");
+ }
public static void prepareLocalRepo() throws IOException {
prepareLocalRepo("target/test-classes/projects/", "spring-cloud");
diff --git a/spring-cloud-release-tools-spring/src/test/java/org/springframework/cloud/release/internal/spring/AcceptanceTests.java b/spring-cloud-release-tools-spring/src/test/java/org/springframework/cloud/release/internal/spring/AcceptanceTests.java
index 61e71036..3215eb3a 100644
--- a/spring-cloud-release-tools-spring/src/test/java/org/springframework/cloud/release/internal/spring/AcceptanceTests.java
+++ b/spring-cloud-release-tools-spring/src/test/java/org/springframework/cloud/release/internal/spring/AcceptanceTests.java
@@ -805,6 +805,8 @@ public class AcceptanceTests {
.add(s));
releaserProperties.getGit().setDocumentationUrl(
file("/projects/spring-cloud-static-angel/").toURI().toString());
+ releaserProperties.getGit().setReleaseTrainBomUrl(
+ file("/projects/spring-cloud-release/").toURI().toString());
releaserProperties.getMaven().setBuildCommand("echo executed_build");
releaserProperties.getMaven().setDeployCommand("echo executed_deploy");
releaserProperties.getMaven()
diff --git a/src/checkstyle/checkstyle-suppressions.xml b/src/checkstyle/checkstyle-suppressions.xml
index 5c5ae51c..98fad09f 100644
--- a/src/checkstyle/checkstyle-suppressions.xml
+++ b/src/checkstyle/checkstyle-suppressions.xml
@@ -28,4 +28,5 @@
+