Re: [PROPOSAL] Refactore use of Guava Lists.*

2024-10-25 Thread Jean-Baptiste Onofré
Hi Eduard Yeah, I mean checkstyle (not spotless). AFAIR, I saw a couple of locations without the diamond syntax. Let me find it out. Maybe we can start with fixing there. Thanks ! Regards JB On Thu, Oct 24, 2024 at 5:07 PM Eduard Tudenhöfner wrote: > > Hey JB, > > I don't think we're ever usin

Re: [PROPOSAL] Refactore use of Guava Lists.*

2024-10-25 Thread Alex Dutra
Hi all, But aren't we now building on Java 11+? I think we could go one step ahead and replace most of these Guava factory methods by List.of(), List.copyOf() and the like – as long as the collection is not modified after. It's more concise and saves us a Guava import. Thanks, Alex On Thu, Oct

Re: [PROPOSAL] Refactore use of Guava Lists.*

2024-10-25 Thread rdb...@gmail.com
It’s correct that these methods aren’t strictly needed. We could translate every case into a slightly different form: Lists.newArrayList() -> new ArrayList<>() Lists.newArrayList(iter) -> new ArrayList(); Iterators.addAll(list, iter) Lists.newArrayList(iterable) -> new ArrayList<>(); Iterators.add

Re: [PROPOSAL] Refactore use of Guava Lists.*

2024-10-24 Thread Jean-Baptiste Onofré
Hi, That was my idea: why not leveraging the JDK11 style here as we are now based on JDK11+ ? Thoughts ? Regards JB On Thu, Oct 24, 2024 at 7:50 PM Alex Dutra wrote: > > Hi all, > > But aren't we now building on Java 11+? I think we could go one step ahead > and replace most of these Guava fa

Re: [PROPOSAL] Refactore use of Guava Lists.*

2024-10-24 Thread Eduard Tudenhöfner
Hey JB, I don't think we're ever using e.g. *Lists.newArrayList()* without the diamond syntax in the codebase, so it's typically always *List list = Lists.newArrayList()*. So I wonder how much of an issue that actually is? Do you have examples in the codebase that don't use the diamond syntax and