<p>Prior to this commit, Bisq's new <code>Config</code> infrastructure would throw an<br>
exception on encountering an unrecognized option in the<br>
<code>bisq.properties</code> config file and the Bisq application would handle this<br>
by reporting an error at the command line indicating that the given<br>
option was not recognized.</p>
<p>For example, given a bisq.properties file that reads as follows:</p>
<pre><code>$ cat $APP_DATA_DIR/bisq.properties
bogus=42
</code></pre>
<p>running Bisq would exit with the following error message:</p>
<pre><code>$ java -jar bisq.jar
error: problem parsing option 'bogus': bogus is not a recognized option.
</code></pre>
<p>This was reasonable enough behavior, but it had two problems. The first<br>
is that the error message did not indicate to the user that the<br>
unrecognized option was found in the config file as opposed to the<br>
command line. Users unfamiliar with the config file might not know to<br>
look there to eliminate or fix the offending option. The second problem<br>
surfaced when testing the Windows executable build for the v1.2.6<br>
release. When such an error was encountered, the executable would just<br>
fail silently, reporting nothing to the user.</p>
<p>Both of these problems should be addressed on their own, i.e. option<br>
parsing errors should report to the user whether the offending option<br>
was at the command line or in the config file, and our packaged<br>
executables should never just fail silently if we can avoid it.</p>
<p>However, this change does not address either of these problems directly.<br>
It rather avoids the problems completely by relaxing config file<br>
parsing to silently allow unrecognized options. This behavior mimics<br>
prior (pre-<code>Config</code>) Bisq versions, and it also follows suit with<br>
Bitcoin Core's own config file processing.</p>
<p>This <span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #3966.">fixes</span> <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="564131501" data-permission-text="Issue title is private" data-url="https://github.com/bisq-network/bisq/issues/3966" data-hovercard-type="issue" data-hovercard-url="/bisq-network/bisq/issues/3966/hovercard" href="https://github.com/bisq-network/bisq/issues/3966">#3966</a>, which surfaced this problem. In that particular issue,<br>
an option line had somehow been added to the user's bisq.properties<br>
config file that consisted of an option key containing 452 octal null<br>
characters (\u0000) followed by an equals sign and an empty option<br>
value. It is unknown how this bogus option was ever added to the user's<br>
config file in the first place, but on the chance that previous Bisq<br>
versions somehow added this, the changes in this commit ensure that such<br>
entries will not cause affected users' Bisq applications to silently<br>
fail in versions 1.2.6 and beyond.</p>

<p>Fixes #replaceWithIssueNr, fixes #replaceWithIssueNr</p>
<p>Your PR description here.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/3967'>https://github.com/bisq-network/bisq/pull/3967</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Allow unrecognized options in config file</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3967/files#diff-0">common/src/main/java/bisq/common/config/Config.java</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3967/files#diff-1">common/src/test/java/bisq/common/config/ConfigTests.java</a>
    (11)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/3967.patch'>https://github.com/bisq-network/bisq/pull/3967.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/3967.diff'>https://github.com/bisq-network/bisq/pull/3967.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/3967?email_source=notifications&email_token=AJFFTNSHSJGCNSWXPYLKJHDRCQWBPA5CNFSM4KT56TAKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4INAHYOA">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNVH6N42POBIS5XPL7DRCQWBPANCNFSM4KT56TAA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNVSXM27VNXIVP7PGPTRCQWBPA5CNFSM4KT56TAKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4INAHYOA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/3967?email_source=notifications\u0026email_token=AJFFTNSHSJGCNSWXPYLKJHDRCQWBPA5CNFSM4KT56TAKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4INAHYOA",
"url": "https://github.com/bisq-network/bisq/pull/3967?email_source=notifications\u0026email_token=AJFFTNSHSJGCNSWXPYLKJHDRCQWBPA5CNFSM4KT56TAKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4INAHYOA",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>