Improve error handling in the Spring HATEOAS-based sample
Work around flow analysis bug in javac (JDK-8054569)

https://bugs.openjdk.java.net/browse/JDK-8054569
Improve rels in Spring-HATEOAS based sample and update the docs to match
Remove unnecessary escaping of newline characters in generated snippets
Enable JSON pretty printing in the Spring HATEOAS-based sample