This task is relevant only to Cayenne 5.0 so using features from Java 11 is ok in general.
As to `var` I have mixed feelings about it. I don't use it myself at all but that's more a habit. In general I'm ok with it when it is perfectly clear what type it hides, and even can see where it could improve readability. For example in this case it seems better for me to use var, then a real type: Map<LongType, EventLongerType> map = ...; for(var entry : map.entrySet()) {...} But again I'm totally fine, if we just agree not to use `var` in Cayenne at all to make life easier. On Fri, Mar 8, 2024 at 8:24 PM Andrus Adamchik <aadamc...@gmail.com> wrote: > Nikita might comment on whether this is a 5.0-only task. But I am with > Michael on "var" in the framework. I use "var" declarations a lot in > throwaway "scripting" code (usually data tasks with DFLib), but in any code > that needs to be maintained, hiding variable types does complicate code > review. That's been a source of frustration for me on various projects. And > this is especially relevant for Cayenne where you want the code to be clear > and readable. > > Cheers, > Andrus > > > On Mar 7, 2024, at 5:52 PM, Michael Gentry <blackn...@gmail.com> wrote: > > > > Just noticed this merge: > > > > > https://github.com/apache/cayenne/pull/605/commits/99138fbcfe8f23e67805557bfcbca5bb452d8325 > > > > I noticed there are several "var" variables, such as: > > > > var orderDbAttribute = getOrderDbAttribute(nodeBuilder.build()); > > > > These won't compile with JDK 8 (introduced in 10). Did the minimum JDK > > change to something higher? The documentation says: Cayenne 4.2 requires > > JDK 1.8 or newer. Looks like 5.x will require JDK 11, so perhaps that's > > what this is about? > > > > If it is JDK 11+, do we want to allow "var" in the codebase? Makes it > > harder to do code reviews (IMHO). > > > > Thanks, > > mrg > > -- Best regards, Nikita Timofeev