Skip to content

Commit 15ea820

Browse files
committed
Minor fixes
1 parent 3820f20 commit 15ea820

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

src/main/java/tools/jackson/dataformat/xml/ser/PrologPI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import tools.jackson.dataformat.xml.util.ArgUtil;
88

99
/**
10-
* Value container to represent XML Processing Intruction (PI)
10+
* Value container to represent XML Processing Instruction (PI)
1111
* within Prolog part of the Document (before XML Root element,
1212
* after XML declaration if one written),
1313
* to be written using {@link XmlGeneratorInitializer}.

src/main/java/tools/jackson/dataformat/xml/ser/XmlGeneratorInitializer.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
*<ul>
1919
* <li>Document Type Declarations (DTD); that is "&lt;!DOCTYPE>" directive
2020
* </li>
21-
* <li>XML Comments (in Document prolog, before the root element)
21+
* <li>Comments (in Document prolog, before the root element)
22+
* </li>
23+
* <li>Processing Instructions (PIs; in Document prolog, before the root element)
2224
* </li>
2325
* </ul>
2426
*<p>
@@ -57,7 +59,7 @@ public XmlGeneratorInitializer linefeedsBetweenPrologDirectives(boolean addLFs)
5759

5860
/**
5961
* Method for adding XML comment; to be written at position added
60-
* with respective to other directives
62+
* relative to other directives
6163
* (but always after XML Declaration which must come before any other output;
6264
* and before Document Root element)
6365
*
@@ -89,7 +91,7 @@ public XmlGeneratorInitializer addDTD(String rootName,
8991

9092
/**
9193
* Method for adding Document Type Declaration (DTD) directive; to
92-
* be written at position added with respective to other directives
94+
* be written at position added relative to other directives
9395
* (but always after XML Declaration which must come before any other output;
9496
* and before Document Root element)
9597
*
@@ -107,7 +109,7 @@ public XmlGeneratorInitializer addDTD(DTD dtd) {
107109

108110
/**
109111
* Method for adding XML Processing Instruction (PI); to be written at
110-
* position added with respective to other directives
112+
* position added relative to other directives
111113
* (but always after XML Declaration which must come before any other output;
112114
* and before Document Root element)
113115
*

src/test/java/tools/jackson/dataformat/xml/ser/XmlGeneratorInitializerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public void testSimplePIs() throws Exception
236236

237237
w = MAPPER.writer().with(
238238
new XmlGeneratorInitializer()
239-
.addPI("target", ""));
239+
.addPI("target", null));
240240
assertEquals(EXP_WITH_NO_DATA,
241241
w.writeValueAsString(new StringBean("test")));
242242
}

0 commit comments

Comments
 (0)