Skip to content

Remove the final keyword from private method - #2276

Merged
eamonnmcmanus merged 1 commit into
google:masterfrom
MaicolAntali:remove-final-private-methods
Dec 9, 2022
Merged

Remove the final keyword from private method#2276
eamonnmcmanus merged 1 commit into
google:masterfrom
MaicolAntali:remove-final-private-methods

Conversation

@MaicolAntali

Copy link
Copy Markdown
Contributor

Remove the final keyword from private method. private methods are implicitly final

@eamonnmcmanus

Copy link
Copy Markdown
Member

Ah yes, that other method in #2275 is @SafeVarargs and in the older Java versions we build with such a method must be either static or final. :-( Looks like Java 9 also allows private but we build with Java 8.

@eamonnmcmanus
eamonnmcmanus merged commit 28affcb into google:master Dec 9, 2022
@MaicolAntali

Copy link
Copy Markdown
Contributor Author

9 also allows private but we build with Java 8.

Precisely, Java 9 has introduced that the SafeVarargs may be used only with private without final


but we build with Java 8

That's why I closed the PR #2275 and open this one :)

@MaicolAntali
MaicolAntali deleted the remove-final-private-methods branch December 9, 2022 16:52
tibor-universe pushed a commit to getuniverse/gson that referenced this pull request Jan 20, 2023
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.

2 participants