Added Checkstyle to build process and fixing checkstyle to all com.src.jpexs classes

This commit is contained in:
Jindra Petřík
2023-10-09 08:57:05 +02:00
parent b6e8ca0d67
commit dc5e50813f
789 changed files with 23773 additions and 22843 deletions

View File

@@ -50,7 +50,7 @@ public class XmlPrettyFormat {
+ "</xsl:stylesheet>";
public boolean prettyFormat(Source source, Result result, int indent, boolean withXmlDeclaration) {
try {
try {
TransformerFactory transformerFactory = TransformerFactory.newInstance();
transformerFactory.setAttribute("indent-number", indent);
Transformer transformer = transformerFactory.newTransformer(new StreamSource(new StringReader(PRETTY_PRINT_XSLT)));
@@ -65,11 +65,11 @@ public class XmlPrettyFormat {
return false;
}
}
public boolean prettyFormat(File source, File result, int indent, boolean withXmlDeclaration) {
return prettyFormat(new StreamSource(source), new StreamResult(result), indent, withXmlDeclaration);
}
public String prettyFormat(String input, int indent, boolean withXmlDeclaration) {
Source xmlInput = new StreamSource(new StringReader(input));
StringWriter stringWriter = new StringWriter();