@@ -1028,7 +1028,7 @@ public void writeNumber(BigDecimal dec) throws IOException
1028
1028
if (_nextName == null ) {
1029
1029
handleMissingName ();
1030
1030
}
1031
- boolean usePlain = isEnabled (JsonGenerator . Feature .WRITE_BIGDECIMAL_AS_PLAIN );
1031
+ boolean usePlain = isEnabled (StreamWriteFeature .WRITE_BIGDECIMAL_AS_PLAIN );
1032
1032
try {
1033
1033
if (_nextIsAttribute ) {
1034
1034
if (usePlain ) {
@@ -1126,7 +1126,7 @@ protected final void _verifyValueWrite(String typeMsg) throws IOException
1126
1126
@ Override
1127
1127
public void flush () throws IOException
1128
1128
{
1129
- if (isEnabled (JsonGenerator . Feature .FLUSH_PASSED_TO_STREAM )) {
1129
+ if (isEnabled (StreamWriteFeature .FLUSH_PASSED_TO_STREAM )) {
1130
1130
try {
1131
1131
_xmlWriter .flush ();
1132
1132
} catch (XMLStreamException e ) {
@@ -1142,15 +1142,10 @@ public void close() throws IOException
1142
1142
super .close ();
1143
1143
1144
1144
// First: let's see that we still have buffers...
1145
- if (isEnabled (JsonGenerator . Feature .AUTO_CLOSE_CONTENT )) {
1145
+ if (isEnabled (StreamWriteFeature .AUTO_CLOSE_CONTENT )) {
1146
1146
try {
1147
1147
while (true ) {
1148
- /* 28-May-2016, tatu: To work around incompatibility introduced by
1149
- * `jackson-core` 2.8 where return type of `getOutputContext()`
1150
- * changed, let's do direct access here.
1151
- */
1152
- // JsonStreamContext ctxt = getOutputContext();
1153
- TokenStreamContext ctxt = _outputContext ;
1148
+ TokenStreamContext ctxt = getOutputContext ();
1154
1149
if (ctxt .inArray ()) {
1155
1150
writeEndArray ();
1156
1151
} else if (ctxt .inObject ()) {
@@ -1160,14 +1155,13 @@ public void close() throws IOException
1160
1155
}
1161
1156
}
1162
1157
} catch (ArrayIndexOutOfBoundsException e ) {
1163
- /* 29-Nov-2010, tatu: Stupid, stupid SJSXP doesn't do array checks, so we get
1164
- * hit by this as a collateral problem in some cases. Yuck.
1165
- */
1158
+ // 29-Nov-2010, tatu: Stupid, stupid SJSXP doesn't do array checks, so we get
1159
+ // hit by this as a collateral problem in some cases. Yuck.
1166
1160
throw new JsonGenerationException (e , this );
1167
1161
}
1168
1162
}
1169
1163
try {
1170
- if (_ioContext .isResourceManaged () || isEnabled (JsonGenerator . Feature .AUTO_CLOSE_TARGET )) {
1164
+ if (_ioContext .isResourceManaged () || isEnabled (StreamWriteFeature .AUTO_CLOSE_TARGET )) {
1171
1165
_xmlWriter .closeCompletely ();
1172
1166
} else {
1173
1167
_xmlWriter .close ();
0 commit comments