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

Use diamond operator (<>) wherever possible #3163

Closed
rohanKanojia opened this issue May 24, 2021 · 25 comments · Fixed by #3740
Closed

Use diamond operator (<>) wherever possible #3163

rohanKanojia opened this issue May 24, 2021 · 25 comments · Fixed by #3740
Assignees
Labels
good first issue Easy hack; Good issue for new contributors help wanted

Comments

@rohanKanojia
Copy link
Member

We're already on Java 8 and we can use this diamond operator which was introduced in Java 7. Yet, there are lots of occurrences in code where we're still not using it. For more information about this, see this Sonar rule[0]

In case anyone is interested in fixing this, you can check all the occurrences where diamond operator could be used here[1]

[0] https://sonarcloud.io/organizations/fabric8io/rules?open=java%3AS2293&rule_key=java%3AS2293
[1] https://sonarcloud.io/organizations/fabric8io/issues?projects=fabric8io_kubernetes-client&resolved=false&rules=java%3AS2293

@theexplorist
Copy link
Contributor

@rohanKanojia Assign me this please!

@AvineshTripathi
Copy link

@rohanKanojia i wanna work on this issue, being a newbie can you help me in this ?

@rohanKanojia
Copy link
Member Author

@AvineshTripathi : oh, unfortunately someone else picked up this issue. Shall I create another one for you?

@AvineshTripathi
Copy link

@rohanKanojia sure i would love to work but thing is I m a newbie with knowledge of java and a very little about docker and kubernetes so if you can help me get into contributions that would be really appreciated ..

@theexplorist
Copy link
Contributor

@rohanKanojia is this issue resolved?
Can i work on this issue? If no, can you assign one for me.

I am working on it, you can check the assigned tag above!

@rohanKanojia
Copy link
Member Author

@ps-19 : You can pick some other issue if you want #3086

@Shatakshi0805
Copy link
Contributor

Shatakshi0805 commented Jul 17, 2021

Can I work on this? @rohanKanojia

@rohanKanojia
Copy link
Member Author

@Shatakshi0805 : I'm sorry for the late reply. I was on PTO. I have created some extra issues. Could you please check if you can pick one of these:

good first issue Easy hack; Good issue for new contributors

@Shatakshi0805
Copy link
Contributor

That's not a problem. yes, I will definitely check these issues. Thanks!

@aadityasinha-dotcom
Copy link
Contributor

Can I work on this issue?

@doitpratik
Copy link

doitpratik commented Sep 17, 2021

it this issue has been solved ??
I can see 1 open pull request

@rohanKanojia
Copy link
Member Author

@doitpratik
Copy link

Then İ would like to work on this issue

@aadityasinha-dotcom
Copy link
Contributor

I had already made a pr for this. Can anyone review that?

@doitpratik
Copy link

doitpratik commented Oct 1, 2021

assign me this task @rohanKanojia

@doitpratik
Copy link

doitpratik commented Nov 10, 2021

any updates, is this issue has been solved or not?

@rohanKanojia
Copy link
Member Author

There are still places where this needs to be fixed. You can see files affected here:

https://sonarcloud.io/issues?severities=MINOR
(Ctrl + F diamond) and you'll see highlighted places

@doitpratik
Copy link

can you please assign this issue to me?

@Ashyum
Copy link

Ashyum commented Nov 14, 2021

can I work on this issue?

@doitpratik
Copy link

@Ashyum issue is assigned to me it will be great if you can find another issue to work on, since I am following this issue from 2-3 months approx

@mhammadsaani
Copy link
Contributor

Hey @rohanKanojia, is this issues solved or work needed on this?
If not then i would love to work on this!

@mhammadsaani
Copy link
Contributor

mhammadsaani commented Jan 13, 2022

Just to clear my mind, I have to do this,
if it is something like this:
List usages = new ArrayList()
I have to make it look like
private List usages = new ArrayList<>()

Or you can share some resource which can help me understand better

@rohanKanojia
Copy link
Member Author

Yes, you're right. You can take a look into Sonar Rule description[0]

[0] https://sonarcloud.io/organizations/fabric8io/rules?open=java%3AS2293&rule_key=java%3AS2293

@mhammadsaani
Copy link
Contributor

Yes, you're right. You can take a look into Sonar Rule description[0]

[0] https://sonarcloud.io/organizations/fabric8io/rules?open=java%3AS2293&rule_key=java%3AS2293

Yes, assign this to me @rohanKanojia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Easy hack; Good issue for new contributors help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants