From 198336191d3631d0cfc53d220441e950b6500f8c Mon Sep 17 00:00:00 2001 From: Shangwen Wang <59810938+ShangwenWang@users.noreply.github.com> Date: Wed, 3 Feb 2021 17:24:33 +0800 Subject: [PATCH 1/3] Update OutputFormat.java --- src/org/apache/xml/serialize/OutputFormat.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/apache/xml/serialize/OutputFormat.java b/src/org/apache/xml/serialize/OutputFormat.java index 6b7892e8ab..efcfbf9027 100644 --- a/src/org/apache/xml/serialize/OutputFormat.java +++ b/src/org/apache/xml/serialize/OutputFormat.java @@ -385,7 +385,7 @@ public int getIndent() /** * Returns true if indentation was specified. */ - public boolean getIndenting() + public boolean isIndent() { return ( _indent > 0 ); } From bfff565697a09dd12d5b23d98594902d16d3273b Mon Sep 17 00:00:00 2001 From: Shangwen Wang <59810938+ShangwenWang@users.noreply.github.com> Date: Wed, 3 Feb 2021 17:25:26 +0800 Subject: [PATCH 2/3] Update BaseMarkupSerializer.java --- src/org/apache/xml/serialize/BaseMarkupSerializer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/apache/xml/serialize/BaseMarkupSerializer.java b/src/org/apache/xml/serialize/BaseMarkupSerializer.java index 43df5c1bb3..54e85edc1b 100644 --- a/src/org/apache/xml/serialize/BaseMarkupSerializer.java +++ b/src/org/apache/xml/serialize/BaseMarkupSerializer.java @@ -355,7 +355,7 @@ protected void prepare() _writer = _encodingInfo.getWriter(_output); } - if ( _format.getIndenting() ) { + if ( _format.isIndent() ) { _indenting = true; _printer = new IndentPrinter( _writer, _format ); } else { From 30203fbd784c008c9df497be73bcbffc7a347610 Mon Sep 17 00:00:00 2001 From: Shangwen Wang <59810938+ShangwenWang@users.noreply.github.com> Date: Wed, 3 Feb 2021 17:25:59 +0800 Subject: [PATCH 3/3] Update IndentPrinter.java --- src/org/apache/xml/serialize/IndentPrinter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/apache/xml/serialize/IndentPrinter.java b/src/org/apache/xml/serialize/IndentPrinter.java index 104fac0192..72ea4efd1c 100644 --- a/src/org/apache/xml/serialize/IndentPrinter.java +++ b/src/org/apache/xml/serialize/IndentPrinter.java @@ -272,7 +272,7 @@ public void flushLine( boolean preserveSpace ) if ( _line.length() > 0 ) { try { - if ( _format.getIndenting() && ! preserveSpace ) { + if ( _format.isIndent() && ! preserveSpace ) { // Make sure the indentation does not blow us away. indent = _thisIndent; if ( ( 2 * indent ) > _format.getLineWidth() && _format.getLineWidth() > 0 )