I have following @ConfigMapping https://github.com/quarkusio/quarkus/blob/main/extensions/devservices/keycloak/src/main/java/io/quarkus/devservices/keycloak/KeycloakDevServicesConfig.java, the mapping has property users. I have mentioned that when I used the KeycloakDevServicesConfig#hashCode in my build step, the hash code was same 1310h386370 even though when I called the KeycloakDevServicesConfig#users, users had a different value (you can try it by setting (quarkus.keycloak.devservices.users.michal=michal). https://smallrye.io/smallrye-config/Main/config/mappings/#validation says that the SR Config generates automatically hashCode. I think it is generally believed that when objects are equal, they should have the same hash code. However, it can't be these config mappings are equal, because the users are different.
Please note that I saw the second value on the dev mode restart, which was triggered by changing of the application.properties file (I added the property mentioned above, previously it was unset).
I guess the reason why this happens is due to the fact how default Map hashcode is implemented, so it can be probably reproduced by using Objects.hash() on maps (XOR trap).
I have following
@ConfigMappinghttps://github.com/quarkusio/quarkus/blob/main/extensions/devservices/keycloak/src/main/java/io/quarkus/devservices/keycloak/KeycloakDevServicesConfig.java, the mapping has propertyusers. I have mentioned that when I used theKeycloakDevServicesConfig#hashCodein my build step, the hash code was same1310h386370even though when I called theKeycloakDevServicesConfig#users, users had a different value (you can try it by setting (quarkus.keycloak.devservices.users.michal=michal). https://smallrye.io/smallrye-config/Main/config/mappings/#validation says that the SR Config generates automaticallyhashCode. I think it is generally believed that when objects are equal, they should have the same hash code. However, it can't be these config mappings are equal, because the users are different.Please note that I saw the second value on the dev mode restart, which was triggered by changing of the application.properties file (I added the property mentioned above, previously it was unset).
I guess the reason why this happens is due to the fact how default
Maphashcode is implemented, so it can be probably reproduced by usingObjects.hash()on maps (XOR trap).