<p><b>@ghubstan</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/3134#discussion_r317374412">desktop/src/main/java/bisq/desktop/util/validation/PhoneNumberValidator.java</a>:</p>
<pre style='color:#555'>> +    public PhoneNumberValidator(String isoCountryCode) {
+        this.isoCountryCode = isoCountryCode;
+        this.countryCallingCodes = new CountryCallingCodes();
+        this.callingCode = countryCallingCodes.getCallingCode(isoCountryCode);
+        this.normalizedCallingCode = countryCallingCodes.getNormalizedCallingCode(isoCountryCode);
+    }
+
+
+    @Override
+    public ValidationResult validate(String input) {
+        normalizedPhoneNumber = null;
+        ValidationResult result = super.validate(input);
+        if (!result.isValid) {
+            return result;
+        }
+        final String trimmedInput = input.trim();
</pre>
<p>But these are Java primitives.  Once set, final Strings and primitives are immutable.  (Class level final primitives must be set in in constructors, as I was doing in the hidden no-arg constructor.)   There are also tricks to create an immutable map (see CountryCallingCodes).</p>
<p>There are other scenarios where final primitives can be reassigned, such as ...</p>
<p>final int[] x = int[0];<br>
function or anonymous inline class --><br>
x[0] = 1;<br>
x[0] = 100;<br>
etc...</p>

<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/3134?email_source=notifications&email_token=AJFFTNUQTY6ZDEM4XON2UU3QGGPWRA5CNFSM4IPCU6SKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCCS7FDI#discussion_r317374412">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNXLMCJESZMGXENC7FTQGGPWRANCNFSM4IPCU6SA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AJFFTNVHZSYH4GN7TENDZPDQGGPWRA5CNFSM4IPCU6SKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCCS7FDI.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/3134?email_source=notifications\u0026email_token=AJFFTNUQTY6ZDEM4XON2UU3QGGPWRA5CNFSM4IPCU6SKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCCS7FDI#discussion_r317374412",
"url": "https://github.com/bisq-network/bisq/pull/3134?email_source=notifications\u0026email_token=AJFFTNUQTY6ZDEM4XON2UU3QGGPWRA5CNFSM4IPCU6SKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCCS7FDI#discussion_r317374412",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>