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

Fix sonar issue S2293 Replace the type specification in this constructor call with the diamond operator ('<>') #1091

Merged
merged 1 commit into from Apr 23, 2024

Conversation

jlerbsc
Copy link
Contributor

@jlerbsc jlerbsc commented Apr 18, 2024

Java uses angular brackets (< and >) to provide a specific type (the "type argument") to a generic type. For instance, List is a generic type, so a list containing strings can be declared with List.

Indepth, our Java code remediation solution, has detected and corrected 1103 violations of this type in the current version of the Biojava project. Manually, this correction would have taken more than 2 days.

We suggest that you correct this to improve the quality and maintainability of the code.

@jlerbsc
Copy link
Contributor Author

jlerbsc commented Apr 18, 2024

I'm not sure that these tests (in class EcodInstallationTest) fail because of this PR.

I can't check this because the tests fail on my Windows machine with the error

[ERROR] Errors:
[ERROR] FastaStreamerTest.iterate:43 " InvalidPath Illegal char <:> at index 2: /D:/de...
[ERROR] FastaStreamerTest.stream:21 " InvalidPath Illegal char <:> at index 2: /D:/dev...

@josemduarte
Copy link
Contributor

I'm not sure that these tests (in class EcodInstallationTest) fail because of this PR.

Yes this is due to an external resource (ECOD) having downtime for the last week or so. I have notified them and I'm hoping for it to come back soon.

I can't check this because the tests fail on my Windows machine with the error
[ERROR] Errors:
[ERROR] FastaStreamerTest.iterate:43 " InvalidPath Illegal char <:> at index 2: /D:/de...
[ERROR] FastaStreamerTest.stream:21 " InvalidPath Illegal char <:> at index 2: /D:/dev...

That sounds like a bug in that test. Thanks for reporting. Can't test it myself directly because I don't have windows at hand. Could you create an issue?

Copy link
Contributor

@josemduarte josemduarte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wonderful, thank you! This will drastically reduce the number of warnings in IDE

@josemduarte
Copy link
Contributor

Ok tests are passing now that ECOD is back

@josemduarte josemduarte merged commit 73e99ca into biojava:master Apr 23, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants