Skip to content

Commit e293cd7

Browse files
committed
Minor clean up of DefaultXmlPrettyPrinter: removed unnecessary field
1 parent ddbca93 commit e293cd7

File tree

1 file changed

+10
-20
lines changed

1 file changed

+10
-20
lines changed

src/main/java/com/fasterxml/jackson/dataformat/xml/util/DefaultXmlPrettyPrinter.java

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,6 @@ public interface Indenter
7070

7171
// // // Config, other white space configuration
7272

73-
/**
74-
* By default we will add spaces around colons used to
75-
* separate object fields and values.
76-
* If disabled, will not use spaces around colon.
77-
*/
78-
protected boolean _spacesInObjectEntries = true;
79-
8073
/**
8174
* By default, will try to set as System.getProperty("line.separator").
8275
* Can later set custom new line with withCustomNewLine method.
@@ -131,7 +124,6 @@ protected DefaultXmlPrettyPrinter(DefaultXmlPrettyPrinter base)
131124
{
132125
_arrayIndenter = base._arrayIndenter;
133126
_objectIndenter = base._objectIndenter;
134-
_spacesInObjectEntries = base._spacesInObjectEntries;
135127
_nesting = base._nesting;
136128
_newLine = base._newLine;
137129
}
@@ -146,8 +138,6 @@ public void indentObjectsWith(Indenter i)
146138
_objectIndenter = (i == null) ? new NopIndenter() : i;
147139
}
148140

149-
public void spacesInObjectEntries(boolean b) { _spacesInObjectEntries = b; }
150-
151141
/**
152142
* Sets custom new-line.
153143
* @since 2.15
@@ -179,13 +169,13 @@ public void writeRootValueSeparator(JsonGenerator gen) throws IOException {
179169
// Not sure if this should ever be applicable; but if multiple roots were allowed, we'd use linefeed
180170
gen.writeRaw('\n');
181171
}
182-
172+
183173
/*
184174
/**********************************************************
185175
/* Array values
186176
/**********************************************************
187177
*/
188-
178+
189179
@Override
190180
public void beforeArrayValues(JsonGenerator gen) throws IOException {
191181
// never called for ToXmlGenerator
@@ -205,7 +195,7 @@ public void writeArrayValueSeparator(JsonGenerator gen) throws IOException {
205195
public void writeEndArray(JsonGenerator gen, int nrOfValues) throws IOException {
206196
// anything to do here?
207197
}
208-
198+
209199
/*
210200
/**********************************************************
211201
/* Object values
@@ -241,7 +231,7 @@ public void writeObjectEntrySeparator(JsonGenerator gen) throws IOException {
241231
public void writeObjectFieldValueSeparator(JsonGenerator gen) throws IOException {
242232
// never called for ToXmlGenerator
243233
}
244-
234+
245235
@Override
246236
public void writeEndObject(JsonGenerator gen, int nrOfEntries) throws IOException
247237
{
@@ -256,7 +246,7 @@ public void writeEndObject(JsonGenerator gen, int nrOfEntries) throws IOExceptio
256246
}
257247
((ToXmlGenerator) gen)._handleEndObject();
258248
}
259-
249+
260250
/*
261251
/**********************************************************
262252
/* XML-specific additions
@@ -292,7 +282,7 @@ public void writeEndElement(XMLStreamWriter2 sw, int nrOfEntries) throws XMLStre
292282
}
293283
sw.writeEndElement();
294284
}
295-
285+
296286
@Override
297287
public void writeLeafElement(XMLStreamWriter2 sw,
298288
String nsURI, String localName, String text, boolean isCData)
@@ -329,7 +319,7 @@ public void writeLeafElement(XMLStreamWriter2 sw,
329319
sw.writeEndElement();
330320
_justHadStartElement = false;
331321
}
332-
322+
333323
@Override
334324
public void writeLeafElement(XMLStreamWriter2 sw,
335325
String nsURI, String localName, boolean value)
@@ -343,7 +333,7 @@ public void writeLeafElement(XMLStreamWriter2 sw,
343333
sw.writeEndElement();
344334
_justHadStartElement = false;
345335
}
346-
336+
347337
@Override
348338
public void writeLeafElement(XMLStreamWriter2 sw,
349339
String nsURI, String localName, int value)
@@ -399,7 +389,7 @@ public void writeLeafElement(XMLStreamWriter2 sw,
399389
sw.writeEndElement();
400390
_justHadStartElement = false;
401391
}
402-
392+
403393
@Override
404394
public void writeLeafElement(XMLStreamWriter2 sw,
405395
String nsURI, String localName, BigInteger value)
@@ -553,7 +543,7 @@ public void writeIndentation(XMLStreamWriter2 sw, int level) throws XMLStreamExc
553543
}
554544
sw.writeRaw(SPACES, 0, level);
555545
}
556-
546+
557547
@Override
558548
public void writeIndentation(JsonGenerator jg, int level) throws IOException
559549
{

0 commit comments

Comments
 (0)