Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the issue:
In the .NET implementation, when the ServerSystemTitle is set, the PreEstablishedSystemTitle is automatically updated. However, this behavior is not present in the Java version.
.NET reference:
https://github.com/Gurux/Gurux.DLMS.Net/blob/c4290171bdc67d51949c9b9de2be1aa9aee30e27/Development/Secure/GXDLMSSecureClient.cs#L165
Java reference:
Gurux.DLMS.Android/Java/DLMS/src/main/java/gurux/dlms/GXDLMS.java
Lines 1493 to 1495 in 2f01fa4
Additionally, in Java, it's not possible to use general protection under certain conditions, as highlighted in the provided link.
Proposed solution: