Opened 4 years ago

Closed 4 years ago

#17823 closed enhancement (fixed)

use diamond operator

Reported by: iwakeh Owned by: karsten
Priority: Low Milestone:
Component: Metrics/Library Version:
Severity: Minor Keywords:
Cc: Actual Points:
Parent ID: #17822 Points:
Reviewer: Sponsor:

Description

example:

 List<byte[]> rawDescriptors = new ArrayList<>();

instead of

 List<byte[]> rawDescriptors = new ArrayList<byte[]>();

Child Tickets

Change History (7)

comment:1 Changed 4 years ago by karsten

Status: newaccepted

Sure, let's change this. The only questions are when we do this and who does it. Ideally, neither of us would have many unmerged branches around when this change gets merged to master, because merging those might be less fun afterwards. How about we do this shortly before the next release?

comment:2 Changed 4 years ago by iwakeh

I'd suggest changing things when there are changes anyway. Like I did in #17821.
This way there is probably more testing involved than with a big change allover.
And, it'll require less time in addition.

Last edited 4 years ago by iwakeh (previous) (diff)

comment:3 Changed 4 years ago by karsten

I like the idea of trying this out in code that we're changing anyway.

But I think we'll have to make the remaining changes in bulk at some point, and I suggest doing that prior to the next release. Otherwise, we might not make these changes in code that we're not touching for months or even years, and until we do, we'll have a ticket open that is not actionable.

Of course, the alternative would be that we agree this is a good change (which we do!), write down in CONTRIB.md that we want to do this for new code, and then close this ticket. I'm okay with this, too, though I think it's not that much work to just make these changes in bulk:

~/src/metrics-lib$ git grep "new.*<" | wc -l
     176

comment:4 Changed 4 years ago by iwakeh

a useful place to do statistics:
in total about 32 files are affected and over all these are straight forward changes.
The only location that shouldn't be simply changed is in the patch for #17821

So, I agree it should be included in the next release.

comment:5 Changed 4 years ago by karsten

Status: acceptedneeds_review

comment:6 Changed 4 years ago by iwakeh

this revision looks fine, see #17824 for more.

comment:7 Changed 4 years ago by karsten

Resolution: fixed
Status: needs_reviewclosed

Great. Merged to master. Thanks! Resolving.

Note: See TracTickets for help on using tickets.