Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style Guide: favor use of diamond constructor invocation #32

Open
javier-godoy opened this issue Jan 18, 2023 · 1 comment
Open

Style Guide: favor use of diamond constructor invocation #32

javier-godoy opened this issue Jan 18, 2023 · 1 comment
Labels
agreed An agreement on the resolution has been reached

Comments

@javier-godoy
Copy link
Member

The Flowing Code Style Guide v1.0.0 relies on Google Java Style Guide, which doesn't cover generics.

Particularly, it doesn't mention that diamond constructor invocation style is preferred.

I.e.

Map<String,List<Integer>> map = new HashMap<>();

Instead of:

Map<String,List<Integer>> map = new HashMap<String,List<Integer>>();
@javier-godoy javier-godoy added the discuss The issue is scheduled for internal discussion label Jan 18, 2023
@mlopezFC
Copy link
Member

mlopezFC commented Jan 23, 2023

I prefer the first one (less code), we should document it somewhere.

@javier-godoy javier-godoy added agreed An agreement on the resolution has been reached and removed discuss The issue is scheduled for internal discussion labels Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agreed An agreement on the resolution has been reached
Projects
Status: In Progress
Development

No branches or pull requests

2 participants