You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remarks:
This is related to XML indentation changes in Java 9 (same behaviour with Java 10). The continuous addition of the empty lines around proxyChain seems to be a bug, lines before/after the elements config or connection are properly removed and indented, for example:
Labelled as a third-party issue (plan to raise a JDK issue), might worth apply the workaround in the meantime (or if in the end it's not a bug)?
Worth noting that with Apache Commons Configuration 2.x the issue does not happen (the DOM tree is "whitespace cleaned" before being indented).
thc202
changed the title
Size of the configuration file keeps increasing each time ZAP is started with Java 9
Size of the configuration file keeps increasing each time ZAP is started with Java 9+
Jul 2, 2018
thc202
added a commit
to thc202/zaproxy
that referenced
this issue
Jul 2, 2018
Change ZapXmlConfiguration to force the creation of new nodes after
loading the configuration, to ensure just the configuration nodes are
persisted when saved (i.e. without any text nodes that would be indented
again).
Add tests to assert the expected behaviour.
Part of zaproxy#2602.
Fixzaproxy#4194 - Size of the configuration file keeps increasing each time
ZAP is started with Java 9+
Steps to reproduce the issue:
config.xml
in home dir);For example, starting with:
ends up in:
Remarks:
This is related to XML indentation changes in Java 9 (same behaviour with Java 10). The continuous addition of the empty lines around
proxyChain
seems to be a bug, lines before/after the elementsconfig
orconnection
are properly removed and indented, for example:is changed to:
(But with following saves it starts adding the new lines.)
The workaround is to disable the indentation when saving the configuration file.
ZAP
Version 2.7.0 (and older).
The text was updated successfully, but these errors were encountered: