Skip to content

Conversation

@stuartmorgan-g
Copy link
Collaborator

Removes lint-baseline.xml, fixing all resulting warnings.

Also makes some fixes that weren't flagged by the command-line lint, but were flagged by Android Studio's linter, to reduce the noise in the UI. This includes all of the conversions of anonymous subclasses to lambdas, which were entirely tool-generated.

Part of flutter/flutter#88011

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

Removes lint-baseline.xml, fixing all resulting warnings.

Also makes some fixes that weren't flagged by the command-line lint, but
were flagged by Android Studio's linter, to reduce the noise in the UI.
This includes all of the conversions of anonymous subclasses to lambdas,
which were entirely tool-generated.

Part of flutter/flutter#88011

@Override
public void onMethodCall(MethodCall call, MethodChannel.Result result) {
public void onMethodCall(@NonNull MethodCall call, @NonNull MethodChannel.Result result) {
Copy link
Member

Choose a reason for hiding this comment

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

It looks like some of the unit tests are failing with an IllegalArgumentException on calls to onMethodCall.

I've had some difficulties getting the these tests to run locally, but given that the only change was to add @nonnull I'm assuming that some of the tests were passing in null somehow?

Copy link
Member

@gmackall gmackall May 19, 2023

Choose a reason for hiding this comment

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

Hmm the tests are definitely not passing in null. I've confirmed that the tests succeed on the commit before this one and not on this one, but I'm somewhat at a loss as to what in these changes could cause this error:

Please provide Old SKU purchase information(token/id) or original external transaction id, not both.
java.lang.IllegalArgumentException: Please provide Old SKU purchase information(token/id) or original external transaction id, not both.
	at com.android.billingclient.api.BillingFlowParams$SubscriptionUpdateParams$Builder.build(com.android.billingclient:billing@@5.2.0:7)
	at com.android.billingclient.api.BillingFlowParams$Builder.build(com.android.billingclient:billing@@5.2.0:42)
	at io.flutter.plugins.inapppurchase.MethodCallHandlerImpl.launchBillingFlow(MethodCallHandlerImpl.java:331)
	at io.flutter.plugins.inapppurchase.MethodCallHandlerImpl.onMethodCall(MethodCallHandlerImpl.java:150)
	at io.flutter.plugins.inapppurchase.MethodCallHandlerTest.launchBillingFlow_null_AccountId_do_not_crash(MethodCallHandlerTest.java:292)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It turns out it was the removal of TextUtils.java; AS thought it was unused, but apparently that's not true. I thought since the test compiled we no longer needed it (what I had found about that file was discussion of adding it to prevent exceptions when calling isEmpty in unit tests), but apparently the implementation used in tests was just always returning false? That would explain the observed behavior, even though it seems crazy.

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label May 23, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label May 23, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented May 23, 2023

auto label is removed for flutter/packages, pr: 4032, due to This PR has not met approval requirements for merging. You are a member of flutter-hackers and need 1 more review(s) in order to merge this PR.

  • Merge guidelines: You need at least one approved review if you are already part of flutter-hackers or two member reviews if you are not a flutter-hacker before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@stuartmorgan-g
Copy link
Collaborator Author

Oops, I forget this hadn't actually been LGTM 😬 auto-submit bot for the win!

Copy link
Member

@gmackall gmackall left a comment

Choose a reason for hiding this comment

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

Oops, I forget this hadn't actually been LGTM 😬 auto-submit bot for the win!

Was actually right about to approve, LGTM!

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label May 23, 2023
@auto-submit auto-submit bot merged commit 1a54d76 into flutter:main May 23, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 24, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request May 24, 2023
flutter/packages@d449a17...fba97fa

2023-05-24 [email protected] Update infra reviewers and add label. (flutter/packages#4068)
2023-05-23 [email protected] [in_app_purchase] Bump `in_app_purchase_android` dependency to 3.0.0 (flutter/packages#4065)
2023-05-23 [email protected] [in_app_purchase] Fix Java lints (flutter/packages#4032)
2023-05-23 [email protected] Roll Flutter from 3437189 to f86c529 (22 revisions) (flutter/packages#4066)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
CaseyHillers pushed a commit to CaseyHillers/flutter that referenced this pull request May 24, 2023
flutter/packages@d449a17...fba97fa

2023-05-24 [email protected] Update infra reviewers and add label. (flutter/packages#4068)
2023-05-23 [email protected] [in_app_purchase] Bump `in_app_purchase_android` dependency to 3.0.0 (flutter/packages#4065)
2023-05-23 [email protected] [in_app_purchase] Fix Java lints (flutter/packages#4032)
2023-05-23 [email protected] Roll Flutter from 3437189 to f86c529 (22 revisions) (flutter/packages#4066)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App p: in_app_purchase platform-android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants