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

cleanup: Declaring a method parameter as final for an interface metho… #5658

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

firefly2442
Copy link
Contributor

…d is useless because the implementation may choose to not respect it.

https://docs.pmd-code.org/pmd-doc-7.9.0/pmd_rules_java_codestyle.html#finalparameterinabstractmethod

@@ -244,7 +244,7 @@
*
* @param campaign the campaign to use in determining the offers to remove
*/
protected abstract void removeUnitOffers(final Campaign campaign);
protected abstract void removeUnitOffers(Campaign campaign);

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'campaign' is never used.
@@ -294,5 +294,5 @@
* @param currentYear The current year
* @return List of turrets
*/
List<MekSummary> generateTurrets(final int num, final SkillLevel skill, final int quality, final int currentYear);
List<MekSummary> generateTurrets(int num, SkillLevel skill, int quality, int currentYear);

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'skill' is never used.
@@ -37,5 +37,5 @@
void initPlugin(Campaign c);

void loadFieldsFromXml(Node node);
void writeToXML(final PrintWriter pw, int indent);
void writeToXML(PrintWriter pw, int indent);

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'pw' is never used.
@@ -37,5 +37,5 @@
void initPlugin(Campaign c);

void loadFieldsFromXml(Node node);
void writeToXML(final PrintWriter pw, int indent);
void writeToXML(PrintWriter pw, int indent);

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'indent' is never used.
@codecov-commenter
Copy link

codecov-commenter commented Jan 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.20%. Comparing base (fd739ba) to head (930f28f).
Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5658      +/-   ##
============================================
- Coverage     10.21%   10.20%   -0.02%     
+ Complexity     6076     6066      -10     
============================================
  Files          1010     1010              
  Lines        139310   139310              
  Branches      20448    20448              
============================================
- Hits          14231    14210      -21     
- Misses       123703   123731      +28     
+ Partials       1376     1369       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@firefly2442
Copy link
Contributor Author

Hmm, I might need some help on this one. Should those functions the Github bot marked be public?

@firefly2442 firefly2442 marked this pull request as draft January 6, 2025 04:22
@Scoppio
Copy link
Collaborator

Scoppio commented Jan 9, 2025

Hmm, I might need some help on this one. Should those functions the Github bot marked be public?

this bot is crazy.

But yes, they are supposed to be public, interfaces only allow for protected or private functions in the most modern versions os java (I believe java 18 or 21).

@firefly2442 firefly2442 marked this pull request as ready for review January 10, 2025 05:22
@firefly2442
Copy link
Contributor Author

PMD no longer flags these as issues. Double check me here though, I'm pretty rusty with Java.

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.

3 participants