I think more correct usage is:
Set<Guid> attachmentsToRemove = new HashSet<>();
Well, for something that survives long enough yes. But `var` is a new
Java 10 feature that is totally valid. See for example here:
https://www.baeldung.com/java-10-local-variable-type-inference
Martin
On Mon, Oct 14, 2019 at 4:11 PM Martin Perina <mperina(a)redhat.com> wrote:
>
>
>
> On Mon, Oct 14, 2019 at 9:49 AM Ales Musil <amusil(a)redhat.com> wrote:
>>
>> Hi,
>> just found out that checkstyle is not completely aware of Java 11 features.
>> Completely valid syntax e.g. "var attachmentsToRemove = new
HashSet<Guid>();"
>
>
> We are using custom DiamongOperator check style:
>
>
https://github.com/oVirt/ovirt-engine/blob/master/build-tools-root/ovirt-...
>
I think more correct usage is:
Set<Guid> attachmentsToRemove = new HashSet<>();
>
> Does check style complain if you change to above?
>
>> is marked with error: "DiamondOperator: Diamond operator should be
used"
>>
>> What can we do about this?
>>
>> Thanks.
>> Regards,
>> Ales
>>
>> --
>>
>> Ales Musil
>>
>> Associate Software Engineer - RHV Network
>>
>> Red Hat EMEA
>>
>> amusil(a)redhat.com IM: amusil
>>
>> _______________________________________________
>> Devel mailing list -- devel(a)ovirt.org
>> To unsubscribe send an email to devel-leave(a)ovirt.org
>> Privacy Statement:
https://www.ovirt.org/site/privacy-policy/
>> oVirt Code of Conduct:
https://www.ovirt.org/community/about/community-guidelines/
>> List Archives:
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/GA3QZK7IHFM...
>
>
>
> --
> Martin Perina
> Manager, Software Engineering
> Red Hat Czech s.r.o.
> _______________________________________________
> Devel mailing list -- devel(a)ovirt.org
> To unsubscribe send an email to devel-leave(a)ovirt.org
> Privacy Statement:
https://www.ovirt.org/site/privacy-policy/
> oVirt Code of Conduct:
https://www.ovirt.org/community/about/community-guidelines/
> List Archives:
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/WXKMNDI6QM6...