Skip to content

fix(gax): make FakePagedApi inner classes public to fix compilation error#12776

Closed
diegomarquezp wants to merge 1 commit intomainfrom
fix-fake-paged-api-access
Closed

fix(gax): make FakePagedApi inner classes public to fix compilation error#12776
diegomarquezp wants to merge 1 commit intomainfrom
fix-fake-paged-api-access

Conversation

@diegomarquezp
Copy link
Copy Markdown
Contributor

@diegomarquezp diegomarquezp commented Apr 13, 2026

This PR fixes a compilation error in PagingTest where FakePagedApi.ListIntegersSizedPage was reported as having private access.

In FakePagedApi.java, ListIntegersSizedPage and ListIntegersPage were declared as private static class. However, they were used as type parameters in the public class ListIntegersPagedResponse. This exposure of private types via public type parameters caused compilation failures in stricter compiler environments (as seen in the CI failure).

Changes

  • Changed visibility of ListIntegersPage and ListIntegersSizedPage from private to public in FakePagedApi.java.

Verification Results

  • Compilation: Verified that mvn test-compile -pl sdk-platform-java/gax-java/gax succeeds.

@diegomarquezp diegomarquezp requested a review from a team as a code owner April 13, 2026 20:45
@@ -133,7 +133,7 @@ public ListIntegersPagedResponse apply(ListIntegersPage input) {
}
}

private static class ListIntegersPage
public static class ListIntegersPage
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think we should make this change. This class has existed for a while and we didn't run into any issues. I think it is because the build infra messed up somewhere after monorepo migration.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

SG, I'll backtrack and find the origin of this problem. Thanks for the quick review.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request modifies the visibility of the ListIntegersPage and ListIntegersSizedPage static inner classes in FakePagedApi.java, changing them from private to public. I have no feedback to provide.

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