Skip to content

Commit 35ead94

Browse files
committed
Run formatter
1 parent 59e6ef7 commit 35ead94

File tree

2 files changed

+31
-32
lines changed

2 files changed

+31
-32
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ pmd_binary(
482482
| Name | Description | Default Value |
483483
| :------------- | :------------- | :------------- |
484484
| <a id="pmd_binary-name"></a>name | The name of the target | none |
485-
| <a id="pmd_binary-main_class"></a>main_class | The main class to use for PMD. | `"net.sourceforge.pmd.PMD"` |
485+
| <a id="pmd_binary-main_class"></a>main_class | The main class to use for PMD. | `"net.sourceforge.pmd.cli.PmdCli"` |
486486
| <a id="pmd_binary-deps"></a>deps | The deps required for compiling this binary. May be omitted. | `None` |
487487
| <a id="pmd_binary-runtime_deps"></a>runtime_deps | The deps required by PMD at runtime. May be omitted. | `None` |
488488
| <a id="pmd_binary-srcs"></a>srcs | If you're compiling your own PMD binary, the sources to use. | `None` |
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,47 @@
11
package com.github.bazel_contrib.contrib_rules_jvm.junit5;
22

3-
import org.junit.jupiter.api.Test;
4-
import org.w3c.dom.Document;
5-
import org.w3c.dom.Node;
6-
import org.xml.sax.InputSource;
7-
import org.xml.sax.SAXException;
3+
import static org.junit.jupiter.api.Assertions.assertEquals;
84

5+
import java.io.IOException;
6+
import java.io.Reader;
7+
import java.io.StringReader;
8+
import java.io.StringWriter;
9+
import java.io.Writer;
910
import javax.xml.parsers.DocumentBuilder;
1011
import javax.xml.parsers.DocumentBuilderFactory;
1112
import javax.xml.parsers.ParserConfigurationException;
1213
import javax.xml.stream.XMLOutputFactory;
1314
import javax.xml.stream.XMLStreamException;
1415
import javax.xml.stream.XMLStreamWriter;
15-
import java.io.IOException;
16-
import java.io.Reader;
17-
import java.io.StringReader;
18-
import java.io.StringWriter;
19-
import java.io.Writer;
20-
21-
import static org.junit.jupiter.api.Assertions.assertEquals;
16+
import org.junit.jupiter.api.Test;
17+
import org.w3c.dom.Document;
18+
import org.w3c.dom.Node;
19+
import org.xml.sax.InputSource;
20+
import org.xml.sax.SAXException;
2221

2322
public class SafeXmlTest {
2423

25-
@Test
26-
public void properlyEscapesCDataSection()
27-
throws XMLStreamException, ParserConfigurationException, IOException, SAXException {
28-
try (Writer writer = new StringWriter()) {
29-
XMLStreamWriter xml = XMLOutputFactory.newDefaultFactory().createXMLStreamWriter(writer);
24+
@Test
25+
public void properlyEscapesCDataSection()
26+
throws XMLStreamException, ParserConfigurationException, IOException, SAXException {
27+
try (Writer writer = new StringWriter()) {
28+
XMLStreamWriter xml = XMLOutputFactory.newDefaultFactory().createXMLStreamWriter(writer);
3029

31-
xml.writeStartDocument("UTF-8", "1.0");
32-
// Output the "end of cdata" marker
33-
SafeXml.writeTextElement(xml, "container", "]]>");
34-
xml.writeEndDocument();
30+
xml.writeStartDocument("UTF-8", "1.0");
31+
// Output the "end of cdata" marker
32+
SafeXml.writeTextElement(xml, "container", "]]>");
33+
xml.writeEndDocument();
3534

36-
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
37-
DocumentBuilder builder;
38-
try (Reader reader = new StringReader(writer.toString())) {
39-
builder = factory.newDocumentBuilder();
40-
Document parsed = builder.parse(new InputSource(reader));
35+
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
36+
DocumentBuilder builder;
37+
try (Reader reader = new StringReader(writer.toString())) {
38+
builder = factory.newDocumentBuilder();
39+
Document parsed = builder.parse(new InputSource(reader));
4140

42-
Node container = parsed.getElementsByTagName("container").item(0);
41+
Node container = parsed.getElementsByTagName("container").item(0);
4342

44-
assertEquals("]]>", container.getTextContent());
45-
}
46-
}
43+
assertEquals("]]>", container.getTextContent());
44+
}
4745
}
48-
}
46+
}
47+
}

0 commit comments

Comments
 (0)