Repository navigation
chore: #2058 Suppress java:S1206 on StringToStringsMap SoapUI port - #2083
Merged
lbroudoux merged 1 commit intoMay 6, 2026
Conversation
… port StringToStringsMap is a manual port of com.eviware.soapui.support.types.StringToStringsMap, kept in the tree so SoapUI scripts hosted by Microcks behave the same way as in real SoapUI without us having to depend on the outdated SoapUI library. The upstream class (e.g. https://github.com/oysteing/soapui/blob/ master/src/java/com/eviware/soapui/support/types/StringToStringsMap.java) overrides equals(Object) with a mode switch driven by an equalsOnThis flag and does not override hashCode, so the equals/hashCode contract is technically violated when equalsOnThis is true. That violation is exactly what Sonar's java:S1206 flags here. Replacing microcks#2068, which tried to fix the contract by overriding hashCode. As @lbroudoux pointed out on that PR, fixing it would make Microcks-hosted SoapUI scripts diverge from real SoapUI - the opposite of this file's stated purpose. The right move is to suppress the Sonar finding with explanation, not to fix the code. Concretely: - Add @SuppressWarnings("java:S1206") to the existing equals override along with an inline comment that points future readers to the SoapUI port rationale. - Strengthen the class Javadoc with an explicit warning: any apparent bug or fragility here should first be checked against the SoapUI source, and if the upstream behaves the same way the finding should be suppressed rather than fixed. No behavioural change. Signed-off-by: Git-HimanshuRathi <[email protected]>
Heyy-Himanshuu
requested review from
SebastienDegodez,
lbroudoux and
yada
as code owners
May 4, 2026 15:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
StringToStringsMapis a manual port ofcom.eviware.soapui.support.types.StringToStringsMap, kept in-tree so SoapUI scripts hosted by Microcks behave the same way as in real SoapUI without taking a dependency on the outdated SoapUI library.The upstream class (e.g. oysteing/soapui copy) overrides
equals(Object)with a mode switch driven by anequalsOnThisflag and does not overridehashCode. That equals/hashCode contract violation is exactly what Sonar'sjava:S1206flags here.Replacing #2068, which tried to fix the contract by overriding
hashCode. As @lbroudoux pointed out on that PR, fixing it would make Microcks-hosted SoapUI scripts diverge from real SoapUI — the opposite of this file's stated purpose. The right move is to suppress the Sonar finding with explanation, not to fix the code.Description
@SuppressWarnings("java:S1206")to the existingequalsoverride, along with an inline comment that points future readers to the SoapUI port rationale.Related issue(s)
See also #2058. Replaces #2068.