Skip to content

Conversation

@MukjepScarlet
Copy link
Contributor

Purpose

Part of #2864

Description

lambda -> method reference (reduce synthetic methods)
duplicated lambdas -> a class

Checklist

  • New code follows the Google Java Style Guide
    This is automatically checked by mvn verify, but can also be checked on its own using mvn spotless:check.
    Style violations can be fixed using mvn spotless:apply; this can be done in a separate commit to verify that it did not cause undesired changes.
  • If necessary, new public API validates arguments, for example rejects null
  • New public API has Javadoc
    • Javadoc uses @since $next-version$
      ($next-version$ is a special placeholder which is automatically replaced during release)
  • If necessary, new unit tests have been added
    • Assertions in unit tests use Truth, see existing tests
    • No JUnit 3 features are used (such as extending class TestCase)
    • If this pull request fixes a bug, a new test was added for a situation which failed previously and is now fixed
  • mvn clean verify javadoc:jar passes without errors

@MukjepScarlet
Copy link
Contributor Author

MukjepScarlet commented Nov 25, 2025

@eamonnmcmanus Please review this. Because I'm not Android developer, I'm not sure if these are benificial with Proguard/R8.

Copy link
Contributor

@Marcono1234 Marcono1234 left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

The idea to add an ExceptionObjectConstructor is really good to reduce the code duplication. I have just a few small suggestions.

The project members might have additional change requests though.

MukjepScarlet and others added 2 commits November 26, 2025 11:25
Co-authored-by: Marcono1234 <[email protected]>
Co-authored-by: Marcono1234 <[email protected]>
Copy link
Member

@eamonnmcmanus eamonnmcmanus left a comment

Choose a reason for hiding this comment

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

Thanks for this! I checked that it passes all of Google's internal tests.

@eamonnmcmanus eamonnmcmanus merged commit e28fdb9 into google:main Nov 26, 2025
16 checks passed
@MukjepScarlet MukjepScarlet deleted the refactor/constructorconstructor branch November 27, 2025 02:21
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