Fix DataSize class according to ISO/IEC 80000#23682
Conversation
|
At a glance, this looks like a series of breaking changes in the API that has existed since Spring Framework 5.1, and such breaking changes are not acceptable. If we were to add ISO 8000 support, it would have to be "in addition" to the existing feature set. |
|
Ok, I'll implement something like ISODataSize class with a corresponding converter and tests. |
|
@newzubakhin please hold on. As Sam indicated, the current proposal is a breaking change and we won't and can't change |
# Conflicts: # spring-core/src/main/java/org/springframework/util/unit/DataSize.java
|
Thanks for the PR @newzubakhin. We've discussed this and decided to keep |
|
I understand keeping the existing |
|
As this was declined due to being a breaking change back in 2019, could you reconsider it for IMO it's very unfortunate to have a piece of javadoc that basically redefines something as well established as the SI prefixes. If there's a configuration property of type |
|
My suggestion is to support both forms, like DataUnit.KILOBYTES, DataUnit.KIBIBYTES, etc. KILOBYTES will not change from current meaning, but So basically does not break backwards compatibility but adds support for proper units. For me it was surprising to find out this terminology used in Spring. I think at this point all technical usage should adhere to ISO. |
|
As someone who got burned by this in a project that surfaced
|
This PR fixes DataSize class according to ISO/IEC 8000 spec (see Binary prefix)