swagger-core
swagger-core copied to clipboard
bug: IntegerSchema returns null for negative values for some locales
NumberFormat.getInstance().parse(Integer.toString(-1)) always throws exception in the following locales: ar· ·ckb· ·he· ·ks· ·pa_Arab· ·ur· ·fa· ·ps· ·uz_Arab· ·eo· ·et· ·fi· ·fo· ·gsw· ·ksh· ·lt· ·nb· ·nn· ·rm· ·se· ·sv· (see https://bugs.openjdk.java.net/browse/JDK-8189097)
This means that schemas with negative enum values will replace these with null if swagger parser is used on a computer with one of the special locales, making development hard for e.g. Norwegian or Finnish developers.
I've created a small pull request which fixes the problem at #4178
I support that this needs to be fixed asap! Thank you @jhannes !