On Fri, Feb 11, 2022 at 10:45 AM jonas....@gmail.com <jonas.kon...@gmail.com> wrote: > > A missing class for a method parameter shouldn't affect you, you could simply > not use that method. If it was a field it'd be a different story. > > - Jonas
I don't think that is correct in this case? If a method signature for `ObjectMapper.readValue(Path src, Class<?> target)` is encountered, I think the class loader will fail to load `ObjectMapper` breaking things. Or is this not the case? I do know that if `Path` was known but referred to something else itself that wasn't, that'd be fine. But in this particular case I would expect actual trouble even if that specific `readValue()` method was not called. -+ Tatu +- > > Michael Rogers schrieb am Freitag, 11. Februar 2022 um 13:48:44 UTC+1: >> >> On 01/02/2022 18:28, Tatu Saloranta wrote: >> > On Mon, Jan 24, 2022 at 8:13 PM Xeno Amess <xeno...@gmail.com >> > <mailto:xeno...@gmail.com>> wrote: >> > >> > Hi. >> > Is there any reason not support Path in JsonFactory and ObjectMapper? >> > If not, then I would provide a pr when I have time. >> > >> > >> > The main reason is that `Path` was added in JDK 7 and for the longest >> > time Jackson only required JDK 6. >> > >> > With 2.13 jackson-databind requires JDK 8, so adding support in >> > `ObjectMapper` (and `ObjectReader`) would be fine. >> > >> > `jackson-core` (JsonFactory / TokenStreamFactory) however still only >> > requires JDK 6 for 2.13, and while >> > we may consider upgrading the baseline within 2.x no decision has been >> > made (or proposal) for 2.14. >> > So addition in JsonFactory would not yet be possible. >> > >> > So, a PR against `2.14` (this is API add so can not go in as part of >> > 2.13.x patches) for `jackson-databind` would be welcome. >> > >> > Anyone else have comments, suggestions, wrt this question? >> >> Older Android devices only have support for the Java 6 standard library. >> Some parts of the Java 8 standard library are supported via library >> desugaring, but unfortunately Path doesn't seem to be among them: >> >> https://developer.android.com/studio/write/java8-support-table >> >> So adding Path to jackson-databind would make it incompatible with about >> 3.4% of Android devices (according to apilevels.com). As an app >> developer currently using 2.13, this would stop me from upgrading to >> 2.14 for another couple of years, while those old devices gradually die out. >> >> Cheers, >> Michael >> >> > -+ Tatu +- >> > >> > -- >> > You received this message because you are subscribed to the Google >> > Groups "jackson-user" group. >> > To unsubscribe from this group and stop receiving emails from it, >> > send an email to jackson-user...@googlegroups.com >> > <mailto:jackson-user...@googlegroups.com>. >> > To view this discussion on the web visit >> > https://groups.google.com/d/msgid/jackson-user/96b2fcd7-3f1c-48fa-aadd-15ff6f3b85abn%40googlegroups.com >> > <https://groups.google.com/d/msgid/jackson-user/96b2fcd7-3f1c-48fa-aadd-15ff6f3b85abn%40googlegroups.com?utm_medium=email&utm_source=footer>. >> > >> > -- >> > You received this message because you are subscribed to the Google >> > Groups "jackson-user" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> > an email to jackson-user...@googlegroups.com >> > <mailto:jackson-user...@googlegroups.com>. >> > To view this discussion on the web visit >> > https://groups.google.com/d/msgid/jackson-user/CAGrxA24hYAiFW1xymfxBcNRqwYTkEakCm8ikO7bwbeuLdXcwsw%40mail.gmail.com >> > <https://groups.google.com/d/msgid/jackson-user/CAGrxA24hYAiFW1xymfxBcNRqwYTkEakCm8ikO7bwbeuLdXcwsw%40mail.gmail.com?utm_medium=email&utm_source=footer>. > > -- > You received this message because you are subscribed to the Google Groups > "jackson-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jackson-user+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jackson-user/2109c03c-15b2-40b7-8b35-afa80b2f6505n%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to jackson-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-user/CAL4a10hZ3n_Kuh8Ns8nQ-S0Yk26%2BE3nbFQa1NTJouUmOd%2Bu2TQ%40mail.gmail.com.