The received lists are always ArrayList, for which removing items one-by-one
from the left is inefficient.
This changes the behavior on exception. Unlike std::remove_if,
ArrayList.removeIf() buffers all filter results before shifting any elements.
PiperOrigin-RevId: 347469725
Changes include:
- update Guice tests that asserts error messages
- export new errors tests
- update Guice compiler flag so parameter names are available at runtime, which is required for the errors tests
PiperOrigin-RevId: 337602195
Changes include:
- update Guice tests that asserts error messages
- export new errors tests
- update Guice compiler flag so parameter names are available at runtime, which is required for the errors tests
PiperOrigin-RevId: 337401912
Changes include:
- skip tests that are testing bytecode generation enabled behaviors
- make line number and source file name information available even when bytecode generation is disabled since it does not use bytecode generation and makes testing easier (some tests rely on the information being available)
- update maven pom files to stop producing a no-aop version of Guice
- added test profile to execute tests with bytecode generation disabled
PiperOrigin-RevId: 336306344
This makes it explicit that the flag controls whether Guice uses bytecode generation at runtime and not just method interception (AOP).
PiperOrigin-RevId: 336196985
This will ensure that the key will not be modified by Guice's package name compressor.
Also fix package name compressor to handle single letter class names.
PiperOrigin-RevId: 334653432
Previously any string that matches the package name pattern will be shortened and this is undesirable when the text is not actually meant to be interpreted as a package name.
This change gives user a way to disable the package name compressor by putting the text in double quotation marks.
PiperOrigin-RevId: 334254171
When an optional binder binding was linked to the same class like below, infinite recursion occurs. There is a check for recursive binding in BindingProcessor class for all linked bindings but that did not work for OptionalBinder since OptionalBinder original key annotation is wrapped into something. So, comparing the original key and linked binding key didn't work.
Added a check for that.
Example:
```
OptionalBinder.newOptionalBinder(binder(), MyClass.class)
.setBinding()
.to(MyClass.class);
```
PiperOrigin-RevId: 332062297
*** Reason for rollback ***
Broke some tests, see b/167569290
*** Original change description ***
Support custom formatting for CHILD_BINDING_ALREADY_SET error.
***
PiperOrigin-RevId: 329731579
This avoid mistaking normal sentences in user added error message as class names. It is also rare and less useful to compress a short class name anyway.
PiperOrigin-RevId: 329401381
- Only add an empty line between summary and detail of the error for custom formatted errors. This removes a weird new line for errors that are formatted in a generic way.
- Indent sources for generic error detail and keep the prepositions, this preserves existing convention and add a bit of visual separation between errors.
PiperOrigin-RevId: 329341133
This allows us to track the type of exception in addition to types of errors. Follow up CL will add a new metric to track the type of the exception.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=327721684
- add an option to enable or disable the formatting in error messages
- minor update on BindingAlreadySet error to be more concise
Note that the tests in errors directory currently are not exported since there is no way to turn on the new error message in opensource version. Those tests will be included once the new error messages are enabled.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=327483098