Skip to content

chore: fix various OverloadMethodsDeclarationOrder warnings #866

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

Closed
wants to merge 2 commits into from

Conversation

Anusien
Copy link
Contributor

@Anusien Anusien commented Oct 31, 2019

Fixes the following OverloadMethodsDeclarationOrder warnings:

[WARN] /home/anusien/opensource/google-http-java-client/google-http-client/src/main/java/com/google/api/client/http/AbstractHttpContent.java:128: Overload methods should not be split. Previous overloaded method located at line '110'. [OverloadMethodsDeclarationOrder]

[WARN] /home/anusien/opensource/google-http-java-client/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java:454: Overload methods should not be split. Previous overloaded method located at line '424'. [OverloadMethodsDeclarationOrder]

[WARN] /home/anusien/opensource/google-http-java-client/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpResponse.java:106: Overload methods should not be split. Previous overloaded method located at line '92'. [OverloadMethodsDeclarationOrder]

[WARN] /home/anusien/opensource/google-http-java-client/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java:176: Overload methods should not be split. Previous overloaded method located at line '149'. [OverloadMethodsDeclarationOrder]

[WARN] /home/anusien/opensource/google-http-java-client/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java:141: Overload methods should not be split. Previous overloaded method located at line '114'. [OverloadMethodsDeclarationOrder]

[WARN] /home/anusien/opensource/google-http-java-client/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java:583: Overload methods should not be split. Previous overloaded method located at line '378'. [OverloadMethodsDeclarationOrder]

[WARN] /home/anusien/opensource/google-http-java-client/google-http-client/src/main/java/com/google/api/client/json/JsonFactory.java:148: Overload methods should not be split. Previous overloaded method located at line '108'. [OverloadMethodsDeclarationOrder]

[WARN] /home/anusien/opensource/google-http-java-client/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java:259: Overload methods should not be split. Previous overloaded method located at line '160'. [OverloadMethodsDeclarationOrder]

[WARN] /home/anusien/opensource/google-http-java-client/google-http-client/src/main/java/com/google/api/client/util/Lists.java:58: Overload methods should not be split. Previous overloaded method located at line '34'. [OverloadMethodsDeclarationOrder]

[WARN] /home/anusien/opensource/google-http-java-client/google-http-client/src/main/java/com/google/api/client/util/escape/UnicodeEscaper.java:101: Overload methods should not be split. Previous overloaded method located at line '62'. [OverloadMethodsDeclarationOrder]

[WARN] /home/anusien/opensource/google-http-java-client/google-http-client/src/main/java/com/google/api/client/util/ArrayMap.java:212: Overload methods should not be split. Previous overloaded method located at line '169'. [OverloadMethodsDeclarationOrder]

[WARN] /home/anusien/opensource/google-http-java-client/google-http-client/src/main/java/com/google/api/client/testing/http/MockLowLevelHttpResponse.java:224: Overload methods should not be split. Previous overloaded method located at line '101'. [OverloadMethodsDeclarationOrder]

@Anusien Anusien requested a review from a team as a code owner October 31, 2019 05:29
@googlebot

This comment has been minimized.

@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label Oct 31, 2019
@elharo elharo added the kokoro:run Add this label to force Kokoro to re-run the tests. label Oct 31, 2019
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Oct 31, 2019
Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

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

I'm not 100% sold on this one. Ideally the code wouldn't have had this, but now that it does, I'd prefer not to churn the files just to move things around. Do these warnings appear in the maven logs? If so, perhaps we could configure maven/javac to turn off these warnings instead.

@Anusien
Copy link
Contributor Author

Anusien commented Jan 6, 2020

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Jan 6, 2020
@chanseokoh chanseokoh changed the title Fix various OverloadMethodsDeclarationOrder warnings refactor: fix various OverloadMethodsDeclarationOrder warnings Oct 8, 2021
@chanseokoh
Copy link
Contributor

The code doesn't compile:

Error:  Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project google-http-client: Compilation failure
Error:  /home/runner/work/google-http-java-client/google-http-java-client/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java:[162,42] method buildRequest(java.lang.String,java.lang.String) is already defined in class com.google.api.client.http.HttpTransport

The PR opened 2 years ago, and it may be that a lot of the API surface have changed. Even if it were for the compilation error, I think it is not safe to accept this kind of change that shuffles things around. Some methods may have changed in the meantime.

If you still want to fix the warning, please start the work refresh from the latest codebase.

@chanseokoh chanseokoh closed this Oct 8, 2021
@chanseokoh chanseokoh changed the title refactor: fix various OverloadMethodsDeclarationOrder warnings chore: fix various OverloadMethodsDeclarationOrder warnings Oct 8, 2021
clundin25 pushed a commit to clundin25/google-http-java-client that referenced this pull request Aug 11, 2022
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants