question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for JDK 14 record types

See original GitHub issue

(note: created based on https://github.com/FasterXML/jackson-future-ideas/issues/46)

With JDK 14 Java will get Record type of classes. While it appears that they can already be used with right set of configuration options, it would probably make sense to add explicit support to maybe use different auto-detect defaults. Support should be done in a way that does not require JDK 14 dependency by jackson-databind (that is a leap too far even for 3.0 at least as of May 2020): either so that

  1. If possible, detection simply uses existing JDK functionality (assuming enough features are translated into bytecode accessible using JDK 8 methods), OR
  2. If support does require JDK 14 API, create another module (jackson-module-jdk14 or jackson-datatype-jdk14, depending).

Marking tentatively as 3.0, but may be moved to a 2.x version if and when someone actual works on this.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:14
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

12reactions
cowtowncodercommented, Dec 1, 2020

Released as part of Jackson 2.12.0.

7reactions
cowtowncodercommented, Aug 21, 2020

And there! It is done – initial implementation at any rate.

If anyone wants to check it out that would be highly appreciated. The highest value contribution would probably be addition of tests in RecordTest under src/test-jdk14/java (same test class or new ones whatever) – I suspect that there may be edge cases wrt handling of annotations, mostly on deserialization side.

Read more comments on GitHub >

github_iconTop Results From Across the Web

4 Records - Java - Oracle Help Center
JDK 14 introduces records, which are a new kind of type declaration. Like an enum, a record is a restricted form of a...
Read more >
Java 14 Record Keyword - Baeldung
Records are immutable data classes that require only the type and name of fields. The equals, hashCode, and toString methods, as well as...
Read more >
Java record type - Data classes in Java - HowToDoInJava
Learn about record type in java. It is introduced as preview feature in Java 14 and shall be used as plain immutable data...
Read more >
Java 14 Records Class | DigitalOcean
A Record class is final, so we can't extend it. · The Record classes implicitly extend java. · All the fields specified in...
Read more >
Java 14 Feature Spotlight: Records - InfoQ
Java SE 14 (March 2020) introduces records as a preview feature. · A record can be best thought of as a nominal tuple;...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found