Skip to content

Commit

Permalink
Mention the dangers of minimization/optimization for EventBus users.
Browse files Browse the repository at this point in the history
RELNOTES=n/a
PiperOrigin-RevId: 392914141
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Aug 25, 2021
1 parent fb109b0 commit d2c202a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions android/guava/src/com/google/common/eventbus/EventBus.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
* <li>It makes the cross-references between producer and subscriber harder to find. This can
* complicate debugging, lead to unintentional reentrant calls, and force apps to eagerly
* initialize all possible subscribers at startup time.
* <li>It uses reflection in ways that break when code is processed by optimizers/minimizers like
* <a href="https://developer.android.com/studio/build/shrink-code">R8 and Proguard</a>.
* <li>It doesn't offer a way to wait for multiple events before taking action. For example, it
* doesn't offer a way to wait for multiple producers to all report that they're "ready," nor
* does it offer a way to batch multiple events from a single producer together.
Expand Down
2 changes: 2 additions & 0 deletions guava/src/com/google/common/eventbus/EventBus.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
* <li>It makes the cross-references between producer and subscriber harder to find. This can
* complicate debugging, lead to unintentional reentrant calls, and force apps to eagerly
* initialize all possible subscribers at startup time.
* <li>It uses reflection in ways that break when code is processed by optimizers/minimizers like
* <a href="https://developer.android.com/studio/build/shrink-code">R8 and Proguard</a>.
* <li>It doesn't offer a way to wait for multiple events before taking action. For example, it
* doesn't offer a way to wait for multiple producers to all report that they're "ready," nor
* does it offer a way to batch multiple events from a single producer together.
Expand Down

0 comments on commit d2c202a

Please sign in to comment.